michalmuskala / jason

A blazing fast JSON parser and generator in pure Elixir.
Other
1.61k stars 170 forks source link

Encode decimals without quotes #72

Closed kamenlitchev closed 5 years ago

kamenlitchev commented 5 years ago

As stated in Issue #71, Jason is currently encoding Decimal values as strings (in fact, quoted floats).

Since Decimals are no less (or much more) than a number with (possibly) a fractional part, Jason should not mistreat them and convert them to string representation.

Additionally, there is a fix for Encoder.encode, where it could produce numbers in scientific notation on encoding (i.e., 123e1).

kamenlitchev commented 5 years ago

Closed as per #71 comments