-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional types not deserializable? #23
Comments
I guess that is the case, since I get the same exception for |
JSON deserialization definitely has some restrictions. Start with primitives, Strings, and Enums (and contained classes containing those types). Be sure to return a value for every field -- nulls tend to cause problems. The examples are very helpful to see what is possible. Please post here if you get it working or not. |
Oh, are you using the latest bintray builds or the older 0.1.0 build from maven central? |
@ScraM-Team thanks for the answer! Yes I am using 0.1.0 from Maven Central. I played around, and indeed with different data types things were fine, until I re-introduced either Optional or LocalDate |
The 0.1.0 build is over a year old, you should definitely consider trying the bintray release: https://bintray.com/konsoletyper/teavm/teavm-flavour-dev/0.2.0-dev-52 https://bintray.com/konsoletyper/teavm/teavm-flavour-dev/0.2.0-dev-52 |
Ok thanks, I'll try. Do you know if support for these types has been added since? |
Sorry, I'm not sure what types were added. I'm going to start a thread in the forums for Flavour enhancements and feedback on what is trickiest when starting out. |
Optional types are not supported by Flavour serialization |
@konsoletyper thanks! |
I might be missing something here, but I am under the impression that
RESTClient.factory(SomeResourceWhichReturnsAnOptional)
throws an exception.This might be due to the fact that the object mapper has to be configured with the Jdk8 module.
Is that the case?
The text was updated successfully, but these errors were encountered: