-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Long field value breaks parsing #5098
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
Comments
Please try Jackson 2.18.3. This sounds like an issue that we fixed in 2.18.3. |
If this also fails in v2.18.3 - could you also provide us with a more reproducible case? This includes providing the class(es) that you are deserializing to and indications about how you are setting up your ObjectMapper (because the mapper is very configurable). |
Yes, of course
|
And data objects |
Please give me some more time to test on v2.18.3. I'll let you know. |
Same behavior in version 2.18.3.
|
please provide the classes as text not as a linked zip |
Sure.
|
@KyryloSemenkoDiversium please refer to other issues and minimize the reproduction. U cant just dump hundreds of lines |
If this was an issue affecting me in work, I would start by creating a Java instance and serializing it to see what the JSON looked like. That might help in finding differences in structure from the JSON you are trying to deserialize. |
Ok definitely need a stand-alone reproduction, ideally minimal, and without framework dependencies (that is only depending on Jackson code and test classes) |
I think "Long" here refers to length of content and not Java |
Sorry it took so long. Here is an example without external dependencies.
Unrecognized field "mfc_id" (class com.diversium.duckserver.example.MappingExample$EdidInfo), not marked as ignorable (3 known properties: "parsed", "data", "name"]) |
I think the type of the field |
Yes, that's true. I apologize for the incorrect reporting. It's not a bug in Mapper, but in my implementation. |
Search before asking
Describe the bug
I have the following structure to deserialize
{ "event_type": "switch_state", "event": { "model": { "units": [], "ports": [], "limits": { "atx": { "click_delays": { "power": { "default": 0.5, "min": 0, "max": 10 }, "power_long": { "default": 5.5, "min": 0, "max": 10 }, "reset": { "default": 0.5, "min": 0, "max": 10 } } } } }, "summary": { "active_port": -1, "synced": true }, "edids": { "all": { "default": { "name": "Default", "data": "00FFFFFFFFFFFF0031D8737701010101231A010380351E780E0565A756529C270F50543FED00B300A9C0950090408180814081C0714F023A801871382D40582C45000F282100001E000000FF0043414645424142452020202020000000FD00324B0F5211000A202020202020000000FC0050694B564D20563420506C7573012D020320714B90041F13223E213D203C0167030C001000802D23097F0783010000023A801871382D40582C45000F282100001E011D007251D01E206E2855000F282100001E023A80D072382D40102C45800F282100001E283C80A070B023403020360006442100001A000000000000000000000000000000000000000000000030", "parsed": { "mfc_id": "LNX", "product_id": 30579, "serial": 16843009, "monitor_name": "PiKVM V4 Plus", "monitor_serial": "CAFEBABE", "audio": true } } }, "used": [] }, "colors": { "beacon": { "blink_ms": 250, "brightness": 255, "red": 228, "blue": 156, "green": 44 }, "flashing": { "blink_ms": 0, "brightness": 128, "red": 0, "blue": 255, "green": 170 }, "bootloader": { "blink_ms": 0, "brightness": 128, "red": 255, "blue": 0, "green": 170 }, "inactive": { "blink_ms": 0, "brightness": 64, "red": 255, "blue": 0, "green": 0 }, "active": { "blink_ms": 0, "brightness": 128, "red": 0, "blue": 0, "green": 255 } }, "video": { "links": [] }, "usb": { "links": [] }, "beacons": { "uplinks": [], "downlinks": [], "ports": [] }, "atx": { "busy": [], "leds": { "power": [], "hdd": [] } } } }
The "mfc_id" field was incorrectly assigned to the "default" object and not to the "parsed" object.
All fields from object "parsed" incorrectly considered as fields from object "default".
Thank you very much for the great de/serialization tool. It's the best in the world.
Version Information
2.17.2
Reproduction
<-- Any of the following
-->
// Your code here
Expected behavior
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: