[YANGTOOLS-331] JSON does not properly encode multiline string Created: 03/Oct/14  Updated: 10/Apr/22  Resolved: 17/Oct/14

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: RichardHill Assignee: Jan Hajnar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: File responsebody.json    
External issue ID: 2147

 Description   

It seems the problem is that some control characters are returned in this HTTP RESPONSE body. odl with netconf loop back to itself is already configured so
not much setup needed.

###Test setup ###

install this http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf/0.2.0-SNAPSHOT/distribution-karaf-0.2.0-20141002.195140-199.zip.sha1

    1. start odl
      bin/karaf
    1. load the features on the karaf console

feature:install odl-mdsal-broker odl-restconf odl-netconf-all odl-netconf-connector-all

    1. request the operational data store

curl -v localhost:8181/restconf/operational/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount -o responsebody.json

    1. validate the response body against JSON. I used python

>import json
>f = open(responsebody.json', 'r')
>json.load(f)

##result
ValueError: Invalid control character at: line 1 column 48567 (char 48566)



 Comments   
Comment by RichardHill [ 03/Oct/14 ]

Attachment responsebody.json has been added with description: JSON response from operational datastore

Comment by Jan Hajnar [ 15/Oct/14 ]

fix:
https://git.opendaylight.org/gerrit/#/c/11975/

Generated at Wed Feb 07 20:52:54 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.