-
Notifications
You must be signed in to change notification settings - Fork 31
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
on deserialization Option[Long] is converted to Option[BigDecimal] #27
Comments
With the latest 0.12 release, the following works .. describe("Serialization of Long in a bean") { You don't need the cast as in your example and since a valid instance of Person is obtained, it's always a long that I get back. And in your example, the pattern match erases the type of Option[] - hence I think it's always the first one that matches. What do you get if you reverse case b: and case l: in position ? Thanks. |
Well I couldn't come up with a better way to show this then pattern matching (reversing says "unreachable code"). In my real application I get an exception though, and my debugger shows my that it's really Option[BigDecimal] ! Hm, what is the best way to check the runtime type? My skills are not that good yet. PS: Using Scala 2.9.0 & sjson 0.12 |
Let me send you another jar, which you can try and see if it solves your problem. Can u pls send me your email address where I can send it .. Thanks .. |
As confirmed in the mail, the new jar works. Fixed in the master. Will push 0.13 soon. |
When I deserialize an object that has a Option[Long] field (or [int]) the resulting object suddenly has a Option[BigDecimal] field - even when I specify the correct @OptionTypeHint!
Is this a bug or did I do something wrong?
Example:
The text was updated successfully, but these errors were encountered: