Skip to content

Preserve all digits of floats when formatting JSON - #3

Merged
jsh9 merged 4 commits into
mainfrom
2025-10-18-Preserve-float-precision
Oct 18, 2025
Merged

jsh9 merged 4 commits into
mainfrom
2025-10-18-Preserve-float-precision

Conversation

@jsh9

@jsh9 jsh9 commented Oct 18, 2025

Copy link
Copy Markdown
Owner

This PR would address pre-commit/pre-commit-hooks#780

@jsh9 jsh9 changed the title Preserve all digits of floats Preserve all digits of floats when formatting JSON Oct 18, 2025
@jsh9

jsh9 commented Oct 18, 2025

Copy link
Copy Markdown
Owner Author

Hi @dougthor42, @SimonKocurek, @jvoravong, @liortct, @SilverTux, @riccardobucco, @Xnot,

I also need a JSON formatter that preserves floating point digits (same as this issue: pre-commit/pre-commit-hooks#780), so I took matters into my own hands and implemented this. This is a standalone CLI tool and pre-commit hook that I recently created.

You are welcome to use it or contribute to it.

@jsh9
jsh9 merged commit 6d7e45a into main Oct 18, 2025
12 checks passed
@jsh9

jsh9 commented Oct 18, 2025

Copy link
Copy Markdown
Owner Author

Published to PyPI as 0.1.2.

@SilverTux

Copy link
Copy Markdown

Hi @dougthor42, @SimonKocurek, @jvoravong, @liortct, @SilverTux, @riccardobucco, @Xnot,

I also need a JSON formatter that preserves floating point digits (same as this issue: pre-commit/pre-commit-hooks#780), so I took matters into my own hands and implemented this. This is a standalone CLI tool and pre-commit hook that I recently created.

You are welcome to use it or contribute to it.

Thank you for letting us know. I'll check your solution, I appreciate the effort you made to fix this!

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.

2 participants