[JSONRPC-36] Incorrect deserialization of NULL value Created: 26/Sep/19  Updated: 08/Jul/20  Resolved: 01/Oct/19

Status: Verified
Project: jsonrpc
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Richard Kosegi Assignee: Richard Kosegi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 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":

{"array-element":null}

}}

is being serialized as

{"accept":{"array-element":{}}}}

Problem escalate if https://jira.opendaylight.org/browse/YANGTOOLS-1003 is involved in serialization pipeline:

{"accept":

{"array-element":null}

}}

should become

{"accept":[null]}

but is

{"accept":{}}

 


Generated at Wed Feb 07 20:05:21 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.