[CONTROLLER-785] JSON encoding for empty list inside container. Created: 08/Sep/14 Updated: 19/Oct/17 Resolved: 09/Sep/14 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | restconf |
| Affects Version/s: | Helium |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Vratko Polak | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Linux |
||
| Issue Links: |
|
||||||||
| External issue ID: | 1744 | ||||||||
| Description |
|
TLDR:
Long version: In older ODL builds, JSON encoding for empty list inside a container did not have list name as kay at all. More recent builds, list name is there as a key, with [] as value. I believe the previous behavior was better, as it resulted in shorter JSON. Standards and drafts are not very clear: } We want to encode empty list in json. This draft for json lists http://tools.ietf.org/html/draft-lhotka-netmod-yang-json-02#section-3.2.4 only tells what to do with one or more elements. But for containers http://tools.ietf.org/html/draft-lhotka-netmod-yang-json-02#section-3.2.2 I believe these two mappings are implied: <bars> but Once again, the previous behavior seem to be the correct one. |