Comments (5)
Done: 6d41604
from yyjson.
No, yyjson writes floating point numbers using the Schubfach
algorithm, which converts floating point numbers to the shortest possible decimal representation.
from yyjson.
Will you consider supporting setting this writing parameter later?
from yyjson.
I'll consider supporting it in the future, but it's not a high priority at the moment.
Implementing this feature would require rewriting the internal float-point writing algorithm, which could be complex and may affect performance.
from yyjson.
A potentially simpler feature that I would like is the ability to write out numbers as if they were 32 bit floats. In my project (a game), all of my real numbers are 32 bit. I've got an editor that can edit things and write out json, but converting values from floats to doubles results in nice short values like 0.8 instead being written out as 0.800000011920929.
from yyjson.
Related Issues (20)
- A character make fail the JSON (empty JSON) HOT 1
- Discussion / Feedback request: Incorporating bytearray type HOT 8
- incorrectly formatted bool fields. HOT 3
- I need to merge multiple JSON strings HOT 1
- Is there a method to store the array of primitive types? HOT 4
- Release life cycle HOT 3
- Remove static qualifiers to support wrapping in other languages HOT 7
- Report row and line number when generating errors, instead of an absolute position HOT 10
- Improve error messages HOT 1
- write array obj not correctly HOT 2
- Condition for calling read_number_raw HOT 3
- yyjson library can not get value that I try to parse. HOT 1
- Diff two objects to create a patch HOT 2
- New release? HOT 1
- Meson build system support HOT 1
- Define YYJSON_DISABLE_UTILS makes symbol not found HOT 4
- [BUG] Prettify JSON has wrong space when prettifying an array of number HOT 2
- Ability to output empty objects as null instead of {} HOT 1
- Tested against "Parsing JSON is a Minefield" test suite? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yyjson.