Closed vcshox closed 7 years ago
You're right. I should increase support to consider RFC7951
inside yang-js.
However, it's a bit of a strange encoding since a leaf
isn't supposed to contain an array data entry. Since JS natively supports undefined and null as separate primitives it doesn't seem logical to not have used a simple null
to designate an empty type in this case.
@saintkepha
Yeah, [null] looks strange at first glance. Any plan to enhance this part?
Thank you.
Yes - planning an update for this in a couple of days
@vcshox - I've also published 0.16.23 which includes this fix
@saintkepha
Thanks a lot!
According to RFC7951#6.9 [null] should be the valid value of an empty type data. However when I evaluated a JSON value with [null], the following error was thrown:
ExpressionError: [module(example-sports)/leaf(leaf_empty)] predicate validation error during apply