mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
12fb30ae9c
* add get_int32() and get_uint32() to the On Demand API Add convenience methods that call get_int64()/get_uint64() and range-check the result, returning NUMBER_OUT_OF_RANGE on overflow. Added to value, document, document_reference, and their simdjson_result wrappers. Closes #1890 * fix document_reference streaming for get_int32/get_uint32 The document_reference getters delegated to document::get_int32/get_uint32 which call get_root_int64/get_root_uint64 with allow_trailing_content=true, rejecting the next document in a stream as trailing content. Call get_root_value_iterator().get_root_int64/get_root_uint64(false) directly to allow trailing content, matching get_int64/get_uint64. Add streaming tests for both getters. * add get_int32/get_uint32 to basics.md * add get_int32/get_uint32 to wrong-type error tests * add get<uint32_t>/get<int32_t> template specializations Wire the 32-bit getters into the generic get<T>() and get(T&) dispatch so that doc.get<uint32_t>() compiles on C++11/14/17 without requiring the C++20 concepts path in std_deserialize.h.