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.
Get it from Maven Central. Don't forget to include LoganSquare's dependencies as well. Check their repo for the latest version:
dependencies {
implementation("de.mannodermaus.retrofit2:converter-logansquare:1.4.1")
}
Plug in the LoganSquareConverterFactory
like any other converter upon creating your Retrofit
instance:
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://your.server.com/api/")
.addConverterFactory(LoganSquareConverterFactory.create())
.build();
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 2016 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.