项目作者: mannodermaus

项目描述 :
A Converter implementation using LoganSquare JSON serialization for Retrofit 2.
高级语言: Java
项目地址: git://github.com/mannodermaus/retrofit-logansquare.git
创建时间: 2015-10-15T12:16:30Z
项目社区:https://github.com/mannodermaus/retrofit-logansquare

开源协议:Apache License 2.0

下载


retrofit-logansquare

⚠️ THIS PROJECT IS ARCHIVED. No further development is scheduled.

A Converter implementation using BlueLine Labs’ LoganSquare JSON serialization for Square’s Retrofit REST library.
Please note that this library is solely intended for usage with Retrofit 2.0.0 and above! It won’t work with 1.9 or earlier. Please refer to this section of the README for instructions on how to include LoganSquare serialization on these versions.

Download

Get it from Maven Central. Don’t forget to include LoganSquare’s dependencies as well. Check their repo for the latest version:

  1. dependencies {
  2. implementation("de.mannodermaus.retrofit2:converter-logansquare:1.4.1")
  3. }

Usage

Plug in the LoganSquareConverterFactory like any other converter upon creating your Retrofit instance:

  1. Retrofit retrofit = new Retrofit.Builder()
  2. .baseUrl("https://your.server.com/api/")
  3. .addConverterFactory(LoganSquareConverterFactory.create())
  4. .build();

I’m using Retrofit 1.x, though!

In that case, it might be time to upgrade! If you can’t or won’t, refer to this gist for a quick solution (no guarantees that it will work 100% of the time, though).

License

  1. Copyright 2016 Marcel Schnelle
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.