Questions tagged [logan-square]

JSON parsing library developed by BlueLine Labs

The fastest JSON parsing and serializing library available for Android. Based on Jackson's streaming API, LoganSquare is able to consistently outperform GSON and Jackson's Databind library by 400% or more1. By relying on compile-time annotation processing to generate code, you know that your JSON will parse and serialize faster than any other method available.

enter image description here

Github

15 questions
16
votes
4 answers

LoganSquare parsing Android library : feedback, benchmarks, pros, cons

I'm using Jackson with DataBind library to parse json and map it java object. I'm also using Gson on other project where perf is less required. On 17 Feb, LoganSquare library is first released, promising 4-10 time faster parsing as Gson. What…
Hugo Gresse
  • 17,195
  • 9
  • 77
  • 119
4
votes
0 answers

Could not locate ResponseBody converter error using LoganSquareConverterFactory

i am trying Retrofit2 with LoganSquare.when i try to handle custom error its showing error Could not locate ResponseBody converter for class. My Error Utils class public class ErrorUtils { public static APIError parseError(Response response)…
praj
  • 849
  • 1
  • 16
  • 39
3
votes
1 answer

Retrofit 2 calls fail - abstract method "void okhttp3.Callback.onResponse"

I have imported Retrofit in my project adding following to app.gradle: compile 'com.squareup.retrofit2:retrofit:2.0.0-beta3' Yet now when execute calls the app crashes with following error: FATAL EXCEPTION: OkHttp Dispatcher Process:…
nikib3ro
  • 20,366
  • 24
  • 120
  • 181
2
votes
1 answer

Deserialize nested field from JSON using LoganSquare

I am using LoganSquare with Retrofit to consume data from a web service. For one particular API, the web service returns a relatively complex JSON response, and the only piece of information I am interested in is nested a couple of layers deep.…
Myk Willis
  • 12,306
  • 4
  • 45
  • 62
2
votes
1 answer

How should I share Files using WiFi Direct to another android device?? - Salut and LoganSquare

** SITUATION IS - ** I am creating an application that shares files between android devices. I use Salut as a WiFi Direct Wrapper. Salut uses LoganSquare for sharing data between peers connected via WiFi Direct. My Objective : How should I…
2
votes
0 answers

aurae/retrofit-logansquare, LoganSquareConverterFactory IllegalArgumentException: Could not locate ResponseBody converter

I am using aurae/retrofit-logansquare to parse json in my android retrofit project. I have added .addConverterFactory(LoganSquareConverterFactory.create()) as per the documentation. Model Class import…
Snappy
  • 51
  • 2
2
votes
2 answers

Parsing nested objects inside array by LoganSquare

I have a problem in parsing JSON received from server. In the model I have: @JsonField(name = "skills") private ArrayList skills; which has fields: @JsonObject public class Skill { @JsonField private int skillID; @JsonField …
Krzystar
  • 141
  • 6
2
votes
0 answers

converting logansqare json class to realm

I am using Retrofit 2 to call restful webservice and parsing the response using LoganSqure JSON parser and storing the date using Realm As realm does not support List data type i need to create two different models for same type response. for…
Hunt
  • 8,215
  • 28
  • 116
  • 256
2
votes
2 answers

LoganSquare not including field name on generated Json

I have a class DbRecord public class DbRecord { @JsonField(name="on_duties") List onDuties; @JsonField(name = "date_time") DateTime dateTime; When I try to serialize an object of this class, the LoganSquare doesn't…
giannisf
  • 2,479
  • 1
  • 17
  • 29
1
vote
0 answers

Retrofit with Logansquare Unable to create converter for java.util.ArrayList

I am using Retrofit 2 with Logansquare converter. Here's my call: @GET("v1/account/notification/{accountId}") Call> getUnreadMessages(@Path("accountId") String accountId); And here's the crash log message: Caused by:…
1
vote
0 answers

LoganSquare - parsing inner json

I am trying to use LoganSquare to parse json with retrofit. One of the fields of my custom class is a JSONObject: @JsonField(name = "Result", typeConverter = JSONAdapter.class) public JSONObject result; But I'm not sure how I am supposed to parse…
Saeed Entezari
  • 3,685
  • 2
  • 19
  • 40
0
votes
0 answers

How to Implement Logansquare TypeConverter in Inner json object class

My Question is How to Implement Logansquare Custom TypeConverter class in the Inner Json object class. This is my model class : class CommunicationParser{ @JsonField public String MSG; @JsonField public int DATA_ID; @JsonField …
TSM
  • 39
  • 4
0
votes
1 answer

Not getting data for anonymous array list

I am using Realm as mobile database and LoganSquare to parse the json data. i want to parse below mentioned json block return from third party service. { "code": 406, "message": "Not Acceptable", "errors": [ "Invalid date range:…
Hunt
  • 8,215
  • 28
  • 116
  • 256
0
votes
2 answers

JSON: Treat many objects as array of object

I have a JSON Like this { "video":{ "video_3745":{ }, "video_3437":{ }, "video_3471":{ }, "video_4114":{ } } } In which every "video_xxxx" is of the SAME type. Is there a way to treat the "video" field as…
0
votes
1 answer

could not be mapped to a JSON object in Logansquare

i am trying to fetch data from Realm and sending it to server using retrofit and for parsing and serializing i am using LoganSquare client = new Retrofit.Builder() .baseUrl(REST_ENDPOINT) …
Hunt
  • 8,215
  • 28
  • 116
  • 256