pyang
pyang copied to clipboard
json2xml + type decimal64
Hi,
I have yang model with below definition
leaf interval {
description
"the maximum time in seconds";
type decimal64 {
fraction-digits 1;
range "1.0..60.0" {
error-message "Invalid value for attribute 'interval'. Valid values are in range:[1.0,60.0]";
}
}
default "13.0";
}
json2xml
with
Input JSON
"interval": "13.0"
Generated XML
<interval>13.</interval>
Expected XML
<interval>13.0</interval>
This line is stripping the zeros json2xml.
Is this a bug or expected implementation?
Fixed in PR #819. Thanks!
Much thanks for the quick fix.