Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-795

JSON Stream codec does not escape double quotes properly.

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • mdsal
    • None
    • Operating System: Windows
      Platform: PC

    • 1766

    Description

      JSON Stream codec does not escape double quotes properly,
      this is observable via Restconf:

      1. Required is sal-test-model loaded in controller.

      PUT http://localhost:8080/restconf/config/opendaylight-mdsal-list-test:top
      Content-Type: application/xml

      <top xmlns="urn:opendaylight:params:xml:ns:yang:controller:md:sal:test:list">
      <top-level-list>
      <name>bug-json</name>
      <nested-list>
      <name>0</name>
      <type>"</type>
      </nested-list>
      </top-level-list>
      </top>

      GET http://localhost:8080/restconf/config/opendaylight-mdsal-list-test:top
      Accept: application/json

      Returns {{"top":{"top-level-list":[{"name":"bug-json","nested-list":[

      {"name":"0","type":"""}

      ]}]}}

      Field type should read "\"".

      Which is invalid JSON

      Attachments

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

        Activity

          People

            rovarga Robert Varga
            tony.tkacik@gmail.com Tony Tkacik
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: