-
Notifications
You must be signed in to change notification settings - Fork 325
JSON empty leaf-list encoding issue #1822
Copy link
Copy link
Closed
Labels
is:enhancementRequest for adding new feature or enahncing functionality.Request for adding new feature or enahncing functionality.status:completedFrom the developer perspective, the issue was solved (bug fixed, question answered,...)From the developer perspective, the issue was solved (bug fixed, question answered,...)
Description
This is a bug that affects libyang1 (hit on 1.0.225-1.1). I have not tested whether the same bug affects v2 as well.
I have a YANG module with a leaf-list of type string:
module null_leaflist_json {
prefix "null_leaflist_json";
namespace "urn:test:null_leaflist_json";
leaf-list test_array {type string;}
}
The correct way to represent an empty leaf-list is in JSON is
"test_array": []
I have made a fix for this in my fork of this repo and added a regression test. Please see the PR #1821 for the fix. Could you please review my fix and help me get it merged in?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
is:enhancementRequest for adding new feature or enahncing functionality.Request for adding new feature or enahncing functionality.status:completedFrom the developer perspective, the issue was solved (bug fixed, question answered,...)From the developer perspective, the issue was solved (bug fixed, question answered,...)