Closed PaulWoitaschek closed 7 years ago
I don't use Moshi -sorry, so I'm not familiar with its factories. In any case, I think if there were some problem here, it will be related with Jolyglot, specifically with the moshi implementation as json provider.
If you will, you can try to narrow the problem and provide a failing test to point me out to the right direction.
Just to be sure, you supplied your instance of Moshi when you created the MoshiSpeaker instance, right?
Moshi moshi = new Moshi.Builder()
.add(new OptionalFactory())
.build();
Jolyglot jolyglot = new MoshiSpeaker(moshi) ;
I'm using moshi for data serialization.
Now I added my custom
Optional<T>
class I want to serialize.However I get an
IllegalArgumentException
ofPlatform T annotated [] requires explicit JsonAdapter to be registered
Moshi is registered with my factory producing optionals:
but
type instanceof ParameterizedType
always evaluates to false.