984 Commits

Author SHA1 Message Date
Daniel Lemire 0112be86b0 4.1.0 (#2532) 2025-10-28 00:10:59 -04:00
Francisco Geiman Thiesen 58c92d6d82 Adding support for compiled json path + json pointer (reflection based) (#2483)
* Adding compile time json path

* using string_view

* Adding support for compile-time json pointer as well.

* Removing unnecessary comment

* Tests now working, still will re-review.

* Adding documentation on the compile-time json path/pointer parsing feature.

* Adding benchmark showing the significant performance advantage of using compiled paths whenever you have them a priori.

* going for JSONPath (correct wording).

* minor update (mostly doc)

---------

Co-authored-by: Daniel Lemire <daniel@lemire.me>
2025-10-27 16:52:41 -04:00
Daniel Lemire 781a7d6c89 removing an unnecessary branch (#2530)
* removing an unnecessary branch

* fixing typo
2025-10-27 14:19:58 -04:00
Daniel Lemire 81f10a01b7 documentation update 2025-10-17 21:00:52 -04:00
Daniel Lemire c3d1d62dfe use cpp 2025-10-17 20:45:57 -04:00
Daniel Lemire ec352430a0 JSONPath is now an RFC (#2517)
* JSONPath is now an RFC

* up
2025-10-17 13:35:04 -04:00
Daniel Lemire 5ed1044056 4.0.7 2025-09-30 11:26:03 -04:00
Francisco Geiman Thiesen b5577d5e85 Merge branch 'master' into francisco/extract_from 2025-09-29 12:46:48 -07:00
wszqkzqk b84a4ec2b9 Fix: Correct narrowing conversion in lsx string parsing (#2481)
Resolves a build failure on the loong64 architecture caused by a narrowing conversion error.

The compiler, with the -Werror=narrowing flag, was flagging the implicit conversion from 'int' (the return
type of to_bitmask()) to 'uint64_t'.

This is fixed by adding an explicit static_cast to uint64_t in include/simdjson/lsx/stringparsing_defs.h.

Signed-off-by: Zhou Qiankang <wszqkzqk@qq.com>
2025-09-29 11:57:06 -04:00
Francisco Geiman Thiesen c7b70de070 Merge branch 'master' into francisco/extract_from 2025-09-29 03:23:02 -07:00
Daniel Lemire 99c4ba6e8f tweak 2025-09-26 23:44:42 -04:00
Francisco Geiman Thiesen 6aa7eea334 Adding extract_from functionality + unit tests 2025-09-26 19:48:16 -07:00
Daniel Lemire bd0e9c1336 tweak 2025-09-26 21:04:53 -04:00
Daniel Lemire 7bf82b02d5 this completes the extra_into work. 2025-09-26 21:00:46 -04:00
Francisco Geiman Thiesen 88a1b3e83b Merge pull request #2471 from simdjson/francisco/extract_into
Adding extract_into functionality + test (targets simdjson >= 4.0 as it relies on reflection)
2025-09-26 01:29:33 -07:00
Francisco Geiman Thiesen c72954eade Addressing reviews. 2025-09-25 21:08:38 -07:00
Francisco Geiman Thiesen 4456a10469 Francisco/using iterators for containers (#2470)
* Using iterators instead of subscript operators and size. This helps us work with a broader range of containers.

* Adding list test

* Using std::ranges::input_range<T> as suggested by moisrex
2025-09-25 17:30:42 -04:00
Francisco Geiman Thiesen d8ed2417ad Adding coverage for extract_into with types that have custom serialization 2025-09-25 03:35:46 -07:00
Francisco Geiman Thiesen 5517df7aee Adding extract_into functionality + test 2025-09-24 22:58:23 -07:00
evbse 6e618b0805 Improve DOM implementation (#2434) 2025-09-21 11:26:33 -06:00
Pavel Novikov bde288a623 Fixed string_builder::operator std::string() (#2465)
* clang format

* fixed `string_builder::operator std::string()`

* fixed variable shadowing error false positive
2025-09-21 11:25:42 -06:00
Daniel Lemire b2932d1b8f release candidate 4.0.6 (#2464) 2025-09-21 08:13:48 -06:00
Daniel Lemire a7811090ef fixing issue 2458 (#2461) 2025-09-20 22:23:09 -06:00
Daniel Lemire 3320885fac Fixing issue 2462 (#2463)
* fun

* progress

* completing the documentation
2025-09-20 22:22:57 -06:00
Daniel Lemire 786c68b158 release 4.0.5 2025-09-18 15:17:32 -06:00
Daniel Lemire 703ef54bd9 allow string reuse (#2454)
* allow string reuse

* portability fix

* using data and not begin
2025-09-18 15:16:38 -06:00
Daniel Lemire ddc7b8c7dd update 2025-09-17 18:59:06 -06:00
Daniel Lemire d8f90bdd14 modifying simdjson::from to avoid exceptions when needed. (#2452)
* modifying simdjson::from to avoid exceptions when needed.

* moved the function

* moving the strings.

* more moving around

* updating cmake version in ci
2025-09-17 18:58:25 -06:00
Daniel Lemire e38a4923e5 adding keys as templates in builder (#2453)
* adding keys as templates in builder

* more guarding

* cmake update in ci

* guarding.

* guarding
2025-09-17 18:58:05 -06:00
Dirk Stolle e6dfa2e0ed remove trailing whitespace + fix typos (#2451) 2025-09-16 22:41:14 -06:00
Daniel Lemire 1f369ef210 minor patch which allows us to pass mutable strings to simdjson::from… (#2448)
* minor patch which allows us to pass mutable strings to simdjson::from and fix
an issue with ambiguous integrals

* compatibility patch.
2025-09-15 22:22:25 -06:00
Daniel Lemire 72e9d44e10 fixing indent 2025-09-15 17:08:12 -06:00
Daniel Lemire 8aae14931d release candidate 4.0.2 (#2441)
* release candidate 4.0.2

* more fixes

* fixing typos

* adding macro check
2025-09-15 09:17:43 -06:00
Daniel Lemire ef3d1ac25f fixing 2440 2025-09-14 08:09:27 -06:00
Daniel Lemire 9292480a9b removing leftover <experimental/...> (#2438) 2025-09-14 08:00:26 -06:00
Daniel Lemire f249e7e128 patch release 2025-09-12 19:26:58 -04:00
Daniel Lemire 7f68baec1e minor tweak 2025-09-05 08:01:04 -04:00
Daniel Lemire e2ea5fb8de This PR adds -> and * operators to our error types and it (#2433)
improves slightly the documentation.
2025-09-04 22:35:01 -04:00
Daniel Lemire e252a21f65 removing expand workaround (#2431)
* removing expland workaround

* minor fixes
2025-09-03 13:30:35 -04:00
Daniel Lemire 89f2b634df guarding from benchmark + rvv 2025-09-02 13:06:25 -04:00
Daniel Lemire f87d6af3e9 fix issue 2424 (#2425) 2025-08-24 16:04:56 -04:00
Daniel Lemire 056d66926a Renames a few macros and extends slightly our basic builder (#2422)
* This PR renames a few macros and extends slightly our basic builder

* minor tuning
2025-08-20 09:01:58 -04:00
Daniel Lemire b434a50681 doing more to discourage value_unsafe(); (#2421) 2025-08-19 16:10:38 -04:00
Daniel Lemire e8ff2fa692 This is a small reorg of the new convert code so that we only expose 'simdjson::from' as experimental (#2418)
* This is a small reorg of the new convert code so that we only expose 'simdjson::from'.
This can be changed in a future release, but we don't want our users to start depending
on code that we might need to change.

* marking simdjson::from as experimental

* updating tests to match recent changes
2025-08-15 15:13:36 -04:00
Daniel Lemire 1ebf115b2b improving the documentation of raw json access (#2416)
* improving the documentation of raw json access

* minor fix

* documentation update

* guarding for exceptions

* fixing exception issue

* fix test

* update.

* saving comments

* more technical fixes

* correcting path in ci test

---------

Co-authored-by: Daniel Lemire <dlemire@lemire.me>
2025-08-15 10:26:20 -04:00
Joshua Gawley 172fbe785d Use std::string_view in parser.load function (#2417) 2025-08-15 10:26:03 -04:00
Joseph Olabisi fb9a689dff Adding DOM support for json path with wildcard (#2346)
* wip brute-force wildcard for json_path

* wip - bruteforce surface wildcard with result

* partially handle keys with wildcard

* wip - nested paths/pointers on wildcard results

* wip

* wip - handling child properties of wildcard result

* done - handling child properties of wildcard result

* fix key

* add support for wildcard for arrays

* handle array INCORRECT_TYPE

* rename at_path_new to at_path_with_wildcard

* add benchmark

* fix benchmark

* use memcmp

* minor improvements

* refactor to tail recursion

* nit

* approximately 30% improvement in runtime

* nit

* corrected logic

* nit

* cleanup

* add some initial tests

* cleanup 2

* modified:   CMakeLists.txt

* cleanup

* cleanup

* cleanup

* cleanup

* restore examples/quickstart/CMakeLists.txt

* cleanup

* restore quickstart.cpp

* revert array-inl.h

* cleanup array-inl.h

* revert object-inl.h

* cleanup object-inl.h

* cleanup

* nit

* nit

* add test

* address some feedbacks

* address additional feedbacks (copilot)

* final changes based on feedback - reduce string allocations

* fix bug in object-inl.h

* fix logic for wildcards inside arrays

* add test for wildcard in nested array

* refactor and create util for getting key and json path

* minor error handling

* refactor process_json_path_of_child_element from recursion to loop in order to prevent stack overflow

* fix bug with array, add boundary check to get_next_key_and_json_path function

* add more tests

* fix boundary check and unnecessary string allocation

* minor changes

* fix

* fix jsonpathutil

* remove unneccessary string allocation

* some minor fixes

* documentation

* removing printout

* various fixes

* reorg of the CI test file

---------

Co-authored-by: Daniel Lemire <daniel@lemire.me>
2025-08-13 21:16:32 -04:00
Daniel Lemire 472f818fe5 trimming repeated code 2025-08-13 20:40:04 -04:00
Daniel Lemire 5c9c133632 improve how we pad strings. (#2415) 2025-08-13 18:41:14 -04:00
Daniel Lemire faf921bc7e introducing a thread-local parser and removing ranges (#2412)
* introducing a thread-local parser

* adding functionality to release the memory

* some more documentation.

* fixing build

* adding benchmarks for 'from'

* generalizing the code somewhat.

* adding tests, fixing the benchmark (now with arrays and streams), and a
minor update to document_stream

* adding missing files (I forgot to check them).

* We cannot use [[nodiscard]] without guarding it, it is C++17

* fixing the cmake

* marking it as experimental

* removing ranges support (it is too experimental)

* putting back documentation.

* guarding SIMDJSON_CONSTEVAL more carefully.

---------

Co-authored-by: Daniel Lemire <dlemire@lemire.me>
2025-08-13 18:08:25 -04:00