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.
Get it on
annotationProcessor "com.bluelinelabs:logansquare-compiler:<latest-logansquare-version>" compile "com.bluelinelabs:logansquare:<latest-logansquare-version>"
Plug in the
LoganSquareConverterFactory like any other converter upon creating your
Retrofit retrofit = new Retrofit.Builder() .baseUrl("https://your.server.com/api/") .addConverterFactory(LoganSquareConverterFactory.create()) .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).
Copyright 2017 Marcel Schnelle Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.