Closed pwittrock closed 8 years ago
decode bool
json encoding has an option called: IntegerAsString. It is used to support storing numbers which cannot be encoded as IEEE doubles, in json. For example, you can store an integer using only digits (no characters) and consequently have no loss of precision (doubles lose precision by definition, which is why floating point arithmetic is not exact).
As we support encoding an integer as a string, we also support decoding numbers stored in a string.
Booleans only have true | false, so there's no support for BooleanAsString.
decodeBool fails to decode "true", but decNum is able to decode "5"
Decoding numbers unquotes fields ("5" can be decoded into an integer field), but decoding booleans does not perform unquoting ("true" fails with an error).
decode boolean line
decode number line