Uploaded image for project: 'jsonrpc'
  1. jsonrpc
  2. JSONRPC-36

Incorrect deserialization of NULL value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • None
    • None
    • General
    • None

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

       

            rkosegi Richard Kosegi
            rkosegi Richard Kosegi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: