[CONTROLLER-795] JSON Stream codec does not escape double quotes properly. Created: 09/Sep/14  Updated: 25/Jul/23  Resolved: 11/Sep/14

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Tony Tkacik Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows
Platform: PC


External issue ID: 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



 Comments   
Comment by Robert Varga [ 09/Sep/14 ]

https://git.opendaylight.org/gerrit/#/c/10947/

Generated at Wed Feb 07 19:53:53 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.