Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mannodermaus/retrofit-logansquare
[⚠️ARCHIVED] A Converter implementation using LoganSquare JSON serialization for Retrofit 2.
https://github.com/mannodermaus/retrofit-logansquare
android converter java json logansquare retrofit2
Last synced: about 1 month ago
JSON representation
[⚠️ARCHIVED] A Converter implementation using LoganSquare JSON serialization for Retrofit 2.
- Host: GitHub
- URL: https://github.com/mannodermaus/retrofit-logansquare
- Owner: mannodermaus
- License: apache-2.0
- Created: 2015-10-15T12:16:30.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-03-27T12:15:42.000Z (over 2 years ago)
- Last Synced: 2023-10-20T21:35:52.880Z (about 1 year ago)
- Topics: android, converter, java, json, logansquare, retrofit2
- Language: Java
- Homepage:
- Size: 237 KB
- Stars: 223
- Watchers: 12
- Forks: 22
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# retrofit-logansquare
⚠️ THIS PROJECT IS ARCHIVED. No further development is scheduled.
A `Converter` implementation using BlueLine Labs' [LoganSquare][logansquare] JSON serialization for Square's [Retrofit][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](#retro1) 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][logansquare] for the latest version:
```groovy
dependencies {
implementation("de.mannodermaus.retrofit2:converter-logansquare:1.4.1")
}
```## Usage
Plug in the `LoganSquareConverterFactory` like any other converter upon creating your `Retrofit` instance:
```java
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][v1gist] for a quick solution (no guarantees that it will work 100% of the time, though).
## License
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 athttp://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.[logansquare]: https://github.com/bluelinelabs/LoganSquare
[retrofit]: https://github.com/square/retrofit
[v1gist]: https://gist.github.com/aurae/8427b93b27483763d9cb