bluelinelabs / bluelinelabs/LoganSquare

could not be mapped to a JSON object. Perhaps it hasn't been annotated with @JsonObject

Open
#158 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.2k
Forks
303
PR merge metrics
No merged PRs in 30d

Description

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)
.client(okHttpClient)
.addConverterFactory(LoganSquareConverterFactory.create())
.build();
```

this is how i am accessing record

```
Appointment appointments = DB.getInstance(mContext).selectNotSyncAppointmentsData();
RestApi.AppointmentsDataApi service = getAppointmentsDataApi();
Call call = service.createUpdateAppointmentsData(appointments);
```

i am getting following error

```
createUpdateAppointmentData : onFailure Class io.realm.AppointmentRealmProxy could not be mapped to a JSON object. Perhaps it hasn't been annotated with @JsonObject?
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the createUpdateAppointmentsData request from Appointment through Retrofit and LoganSquareConverterFactory, then inspect the reported io.realm.AppointmentRealmProxy mapping failure. Reproduce the request with the shown Realm record and determine what behavior or annotation the library expects; done means the record can be serialized for the request without this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.