[YANGTOOLS-443] Error - empty type not parsed correctly in JSON format Created: 10/Apr/15  Updated: 10/Apr/22  Resolved: 12/May/15

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

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

Operating System: All
Platform: All


External issue ID: 2973

 Description   

I have controller master branch from 19th of March and I’m working with node of type empty.

The problem is with JSON format. Successful ways for PUT in JSON format are to put "link-status" : null according to this specification:

http://www.xml.com/lpt/a/1658

Get request retrieve always data this way "link-status" : "". But according to this specification:

https://tools.ietf.org/html/draft-lhotka-netmod-yang-json-02#section-3.3.9

we should PUT empty element this way "link-status" : [null] but I’m getting 400 bad request error:
"error-type": "protocol",
"error-tag": "malformed-message",
"error-message": "Error parsing input: Incorrect nesting caused by parser."

Could you please tell us if the second way is correct and if it's just not working or the right way is first option (w/o array)? The second question is if the respond data "link-status" : "" are correct.



 Comments   
Comment by Tony Tkacik [ 12/May/15 ]

remote: https://git.opendaylight.org/gerrit/20104

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