Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-331

JSON does not properly encode multiline string

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 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)

      Attachments

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

        Activity

          People

            jhajnar@cisco.com Jan Hajnar
            ricjhill@gmail.com RichardHill
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: