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
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
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
Daniel Lemire
4d4ed92055
Removes 5 KB of tables in the number parsing routine ( #1139 )
...
* Removes 5 KB of tables at the expense, and a load, at the expense
of a multiplication and a shift. I have not benchmarked this new
code, but my expectation is that it should be largely performance
neutral. The motivation is to reduce the size of the library slightly.
There is also a matter of elegance.
2020-09-02 15:47:11 -04:00
John Keiser
9b11e119d4
Make skip_double() comment more explicit
2020-08-18 21:25:03 -07:00
John Keiser
988c62baed
Encapsulate significant_digits()
2020-08-18 21:25:03 -07:00
John Keiser
eb3e640003
Return bool from compute_float_64
2020-08-18 21:25:03 -07:00