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

Incorrect deserialization of NULL value

    XMLWordPrintable

Details

    • Bug
    • Status: Verified
    • Medium
    • Resolution: Done
    • None
    • None
    • General
    • 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":

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

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: