Skip to content

Conversation

@russcam
Copy link
Contributor

@russcam russcam commented Apr 11, 2019

This commit updates

  • the DoubleToStringConverter from utf8json to
    always emit a trailing decimal point and trailing decimal value when
    serializing floating point numbers to JSON.
  • the DecimalFormatter from utf8json to always emit a trailing decimal
    point and trailing decimal value when serializing floating point numbers to JSON.

Update unit tests to reflect this change

Fixes #3657

This commit updates

- the DoubleToStringConverter from utf8json to
always emit a trailing decimal point and trailing decimal value when
serializing floating point numbers to JSON.
- the DecimalFormatter from utf8json to always emit a trailing decimal
point and trailing decimal value when serializing floating point numbers to JSON.

Update unit tests to reflect this change

Fixes #3657
Copy link
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

//const int max_trailing_padding_zeroes_in_precision_mode_;

static readonly Flags flags_ = Flags.UNIQUE_ZERO | Flags.EMIT_POSITIVE_EXPONENT_SIGN;
static readonly Flags flags_ = Flags.UNIQUE_ZERO | Flags.EMIT_POSITIVE_EXPONENT_SIGN | Flags.EMIT_TRAILING_DECIMAL_POINT | Flags.EMIT_TRAILING_ZERO_AFTER_POINT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So happy these flags exist and problem is solved at the root!

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.

3 participants