Comments (3)
I'll be submitting a PR shortly!
from minijson_reader.
Hey @michaelkourlas, I went on a refactoring spree and reworked the value
class entirely, on the rework_number_parsing
branch.
These *_representation_available()
functions are no longer a thing (and I wouldn't know how to neatly bring them back) because those representations are created lazily by calling value.as<T>()
with T
being an arithmetic type. std::range_error
is thrown if the number does not fit in T
.
from minijson_reader.
This library really isn't great, and if I were to rewrite it now from scratch it would look very different (but there are probably better alternatives around anyway, even respecting the same constraints e.g. no heap memory allocations).
#4 has been around for years, and I haven't had time to properly think about the problem of making number parsing less rubbish, nor did anyone come up in the meantime with a good solution ready for me to implement (or to just merge).
Given the context, I agree with your idea of adding those two bools to at least solve this particular issue. The fastest way for you to have it done is, well, to issue a pull request. If you keep it single-topic, add the tests and the documentation, and make it easy to review, I'll merge it straightaway.
from minijson_reader.
Related Issues (14)
- Small compilation errors HOT 4
- minijson_reader truncates strings containing a Unicode null character (\u0000) HOT 2
- Travis CI tests not running any more
- Rework dispatch HOT 3
- Determine if toplevel content is object or array HOT 10
- Allow user-provided specializations to convert values
- parse_object issue HOT 2
- minijson_reader does not reject unescaped control characters in strings HOT 2
- C++17 features HOT 1
- build errors on OSX
- Rework number parsing HOT 8
- License change request HOT 3
- Unable to read arrays HOT 1
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 minijson_reader.