John Keiser
8b978e6aea
Don't call functions max() (conflicts with Windows macro)
2020-10-04 12:47:30 -07:00
John Keiser
a700848bae
Move ondemand implementation to include/
2020-10-04 12:47:30 -07:00
John Keiser
9bbfd5804e
Put haswell/westmere/fallback/amd64 in simdjson namespace
2020-10-04 12:47:30 -07:00
John Keiser
b234d74f43
Remove unnamed namespace from ondemand
2020-10-04 12:47:30 -07:00
John Keiser
cd49ff330d
Fix g++-7 quickstart errors
2020-10-04 12:47:30 -07:00
John Keiser
49faf7af1a
Make simdjson_result implementation-specific
2020-10-04 12:47:30 -07:00
John Keiser
c892b83c93
Make ondemand classes usable from simdjson_result
2020-10-04 12:47:30 -07:00
John Keiser
8fd0cdc732
Iterate value without going through indirection
...
Avoids issues with value being released early
2020-10-04 12:47:30 -07:00
John Keiser
fe7a4d42d3
Fix top level values
2020-10-04 12:47:30 -07:00
John Keiser
7c2072789c
Fix issue with strings not including their first character
2020-10-04 12:47:30 -07:00
John Keiser
21b6279b74
Add document-level number/atom parsing
2020-10-04 12:47:30 -07:00
John Keiser
4d89076bdc
Check for EOF when skipping containers
...
Revert that?
Or not
2020-10-04 12:47:30 -07:00
John Keiser
71e4ff7e03
Fix compile errors on C++11/noexcept
2020-10-04 12:47:30 -07:00
John Keiser
d2dfda6583
Ensure iterator is kept alive while iterators are active
2020-10-04 12:47:30 -07:00
John Keiser
6a855f528b
Ensure only leaf values can push the iterator
2020-10-04 12:47:30 -07:00
John Keiser
fb93109c2d
Use default constructors/assignment where possible
2020-10-04 12:47:30 -07:00
John Keiser
bd190af7a3
Require iterators to finish cleanly and release
2020-10-04 12:47:30 -07:00
John Keiser
44268b0c6b
Remove object::has_next
2020-10-04 12:47:30 -07:00
John Keiser
6451e5e7d1
Remove array::has_next
2020-10-04 12:47:30 -07:00
John Keiser
2b3c4c68e4
Ride the lightning
2020-10-04 12:47:30 -07:00
John Keiser
7030cf2433
Release object/array after finished
2020-10-04 12:47:30 -07:00
John Keiser
26d7881b80
Require value to be deleted after most value conversions
2020-10-04 12:47:29 -07:00
John Keiser
21fe42b28c
Release the iterator after use
2020-10-04 12:47:29 -07:00
John Keiser
d5ecf68d26
Make json_iterator_ref unique
2020-10-04 12:47:29 -07:00
John Keiser
0ddff4ec7d
json_iterator * -> json_iterator_ref
2020-10-04 12:47:29 -07:00
John Keiser
283ac3191f
Rename parse->iterate, add iterate_raw
2020-10-04 12:47:29 -07:00
John Keiser
4dd0c80dad
Move current_string_buf_loc to json_iterator
2020-10-04 12:47:29 -07:00
John Keiser
3b53c6ca47
Use json_iterator as shared state instead of document
2020-10-04 12:47:29 -07:00
John Keiser
a90b8fb449
Remove depth tracking from ondemand api
2020-10-04 12:47:29 -07:00
John Keiser
1da509027e
Add root number/atom parsing functions
2020-10-04 12:47:29 -07:00
John Keiser
5b96e4761e
Remove side-effecting assumption
2020-10-04 12:47:29 -07:00
John Keiser
311ea79238
Fix noexceptions builds
2020-10-04 12:47:29 -07:00
John Keiser
cfcb0d4fb7
Use json_iterator in array/object
2020-10-04 12:47:29 -07:00
John Keiser
97d03f3215
token_iterator -> json_iterator
2020-10-04 12:47:29 -07:00
John Keiser
0a6260b1d8
Fix clang 6 compile issue
2020-10-04 12:47:29 -07:00
John Keiser
12caf2510e
Mark unused variables
2020-10-04 12:47:29 -07:00
John Keiser
a58d2f710d
Fix C++11 error
2020-10-04 12:47:29 -07:00
John Keiser
5cf68416d8
Don't bother comparing field names in parserandom
2020-10-04 12:47:29 -07:00
John Keiser
ebcb3c6b3b
On-demand parse implementation
2020-10-04 12:47:29 -07:00
Daniel Lemire
f1841e48b3
Minor fixes to some headers (tweak) ( #1198 )
2020-10-02 12:29:05 -04:00
Daniel Lemire
9865bb6904
Make it possible to check that an implementation is supported at runtime ( #1197 )
...
* Make it possible to check that an implementation is supported at runtime.
* add CI fuzzing on arm 64 bit
This adds fuzzing on drone.io arm64
For some reason, leak detection had to be disabled. If it is enabled, the fuzzer falsely reports a crash at the end of fuzzing.
Closes : #1188
* Guarding the implementation accesses.
* Better doc.
* Updating cxxopts.
* Make it possible to check that an implementation is supported at runtime.
* Guarding the implementation accesses.
* Better doc.
* Updating cxxopts.
* We need to accomodate cxxopts
Co-authored-by: Paul Dreik <github@pauldreik.se >
2020-10-02 11:04:51 -04:00
Daniel Lemire
8b5a89c136
Parsing floats with 19 significant digits should be fine. ( #1191 )
...
* Parsing floats with 19 significant digits should be fine.
* Adding more tests with very long mantissa.
2020-09-29 19:42:43 -04:00
Daniel Lemire
0e584fa4a5
Attempt to fix issue 1187. ( #1192 )
2020-09-27 12:04:47 -04:00
Daniel Lemire
60c139a844
Faster and more correct serialization ( #1168 )
...
* Adding new files.
* Better.
* Fixing minifier and adding tests.
* Adding benchmarks.
* Including the array header.
* Replacing old stream-based code by the new code.
* Doubling up the itoa.
* Hidden away to_chars in internal namespace.
* Removing the repetitions.
* Documented the atoi functions.
* Tuning the escape sequences.
* Moving the operators off the main namespace.
* Added more tests.
* Tweaking the implementation so that it works with and without exp.
* The string_builder template and mini_formatter class
are not part of our public API and are subject to change
at any time!
* Adding a benchmark and some optimization.
* Cleaning.
* Strictly speaking, this header is needed.
2020-09-23 10:00:39 -04:00
Daniel Lemire
f410213003
Improve documentation on padding
...
- Improves and clarifies the documentation on padding.
- Use std:: prefix for memcpy, strlen etc.
Related to issues #1175 and #1178
2020-09-23 09:07:14 +02:00
Daniel Lemire
7fc07e2d5e
Correcting typo
2020-09-16 11:11:49 -04:00
Daniel Lemire
72c83d9430
This avoids locale-dependent number parsing at the standard library level ( #1157 )
...
* This avoids locale-dependent number parsing at the standard library level.
* Adding missing cast.
* Inserting the missing "endif"
* Trial and error.
* Another attempt.
* Another tweak.
* Another fix.
* Restricting it even more.
* Tweaking our symbol checks.
* Somewhat smarter tests.
* Nice comments.
* Minor simplification.
* Adding cerr.
2020-09-15 11:36:18 -04:00
Daniel Lemire
bfbac12f76
We were forgetting to check the end bytes at the end of the UTF8 validation. ( #1173 )
...
* We were forgetting to check the end bytes at the end of the UTF8 validation.
* Silencing the sanitizer
* Better explanation.
2020-09-15 11:33:09 -04:00
Daniel Lemire
461f7dc9f9
Remove unnecessary comment.
2020-09-14 10:44:10 -04:00
Daniel Lemire
3e5497e2f9
Fixes issue 1170 and makes the usage of minify easier. ( #1171 )
...
* Fixes issue 1170 and makes the usage of minify easier.
* This should get the fallback implementation to detect unclosed strings.
2020-09-12 16:20:20 -04:00