Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmos Explorer discards trailing zeroes from number tokens #1482

Open
nickwb opened this issue Jun 12, 2023 · 0 comments
Open

Cosmos Explorer discards trailing zeroes from number tokens #1482

nickwb opened this issue Jun 12, 2023 · 0 comments

Comments

@nickwb
Copy link

nickwb commented Jun 12, 2023

Hi Cosmos Team,

This relates to a Core/SQL cosmos instance.

An interesting edge case, I discovered that explorer will discard trailing zeroes from number tokens in the JSON document.

For example, the object { "value": 12345.0000 } will be shown as 12345 in explorer.
This appears to be an issue with the front-end code that renders out the JSON document with syntax highlighting.
Chrome/Edge devtools show that the Cosmos endpoint is returning the extra digits in the raw payload.

As you may be aware, the decimal type in C#/.Net will preserve trailing zeroes like these - and using the Cosmos SDK will correctly roundtrip these values (it's just explorer which is misleading).

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

No branches or pull requests

1 participant