Details
-
Bug
-
Status: Verified
-
Medium
-
Resolution: Done
-
None
-
None
-
None
Description
Gson instance inside org.opendaylight.jsonrpc.bus.jsonrpc.JsonRpcBaseMessage is created with default options which include serializeNull = false.
As a consequence, if JsonObject has property with null value, it is incorrectly deserialized as empty object.
eg:
{"accept":
}}
is being serialized as
{"accept":{"array-element":{}}}}
Problem escalate if https://jira.opendaylight.org/browse/YANGTOOLS-1003 is involved in serialization pipeline:
{"accept":
}}
should become
{"accept":[null]}but is
{"accept":{}}
Attachments
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 84755,2 | JSONRPC-36 : Correctly deserialize NULL value | master | jsonrpc | Status: MERGED | +2 | +1 |
| 84766,3 | JSONRPC-36 : Correctly deserialize NULL value | stable/sodium | jsonrpc | Status: MERGED | +2 | +1 |
| 84767,1 | JSONRPC-36 : Correctly deserialize NULL value | stable/fluorine | jsonrpc | Status: MERGED | +2 | +1 |
| 84768,2 | JSONRPC-36 : Correctly deserialize NULL value | stable/neon | jsonrpc | Status: MERGED | +2 | +1 |