DecimalStringCodec contains the following:
@Override protected Decimal64 deserializeImpl(final String product) { // FIXME: run value validation return Decimal64.valueOf(product); }
This conversion disregards fraction-digits, leading to internal representation not matching the underlying schema. After parsing the string we need to consult the DecimalTypeDefinition and use Decimal64.scaleTo() to normalize the value to match fraction-digits.
- blocks
-
YANGTOOLS-1442 Enforce range constraints in DecimalStringCodec
- Resolved
- is blocked by
-
YANGTOOLS-1440 Add support for adjusting Decimal64 scale
- Resolved