Skip to content

Conversation

@ymv
Copy link

@ymv ymv commented Dec 16, 2013

New decode option number_format - when set to decimal, numbers with exponent or fraction are decoded to erlang-decimal compatible tuple. For original behaviour omit this option or set it to float

{1,12,5} = jsonx:decode(<<"-1.2e6">>, [{number_format, decimal}]).

ymv added 2 commits December 13, 2013 23:49
JSON non-integer numerals as decoded to {Sign, Value, Scale} tuple
instead of floating-point value, if {number_format, decimal} option
is given to jsonx:decode/2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant