Closed andrew-lee-1089 closed 8 months ago
I have found the place of this error in serialize.py
elif with_defaults == WithDefaults.IF_SET:
if element._changed() or element._default == element:
d[yname] = element
In my case, parameter has no a default value (so _default returns False), and type of parameter is int (element is not set and because of its type YANG model returns 0). So 'element._default == element' returns True because of False == 0 is True and in JSON I have a lot of unnecessary integer parameters with value 0
Hi,
Could you please try again with recent versions of pyangbind?
Thanks.
Closing issues without recent activity
Due to https://github.com/robshakir/pyangbind/blob/master/pyangbind/lib/yangtypes.py#L939 there is no way to distinguish between leaves that have a default value of False and those that have no default