[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": }} 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":{}}
|