Closed deshmukhrohit11 closed 7 years ago
An extra Date
adapter should be add to moshi instance for things to work.
If you're using RFC3339, add com.squareup.moshi:moshi-adapters
to project dependencies and use Rfc3339DateJsonAdapter
:
Moshi moshi = new Moshi.Builder()
...
.add(Date.class, new Rfc3339DateJsonAdapter())
.build();
Otherwise, create custom JsonAdapter
and add that to moshi likewise.
Thank you. It work like charm..
I am newbie to moshi-jsonapi.
I am using JSONAPI in my project. I have one attribute of Date. I am getting error for it.
java.lang.IllegalArgumentException: Platform class java.util.Date annotated [] requires explicit JsonAdapter to be registered
Any one have any idea?