Open alexfishgait1234 opened 9 months ago
The source code has not been amalgamated. @alexfishgait1234 Please read and follow the Contribution Guidelines.
@alexfishgait1234 You made your changes in the single_include
file, which is generated from the individual files in the include
directory. You need to change the individual files and then update the single_include
version using make amalgamate
.
Hoi.thanks a lot for writing. Sorry for the mess.i wanted to create pull request in our forked local repo in order to test it but by mistake did it for your develop.its still draft of course. We want to use bson format without any memory allocation with our real-time string and allocator.i found all places where this allocator support is missing and trying to implement it.this lib is really greater and we want to integrate it in our real time product.thanks a lot .alex
On Fri, Sep 29, 2023, 17:31 Niels Lohmann @.***> wrote:
@.**** requested changes on this pull request.
- Please amalgamate.
- Please add a proper description of the changes. Why are they needed? What is the benefit?
- Please add a test case using the allocator and the string type.
— Reply to this email directly, view it on GitHub https://github.com/nlohmann/json/pull/4167#pullrequestreview-1651036275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AODNI3FSYIBLO3STSUFCEJTX43SVVANCNFSM6AAAAAA5MKXRBQ . You are receiving this because you were mentioned.Message ID: @.***>
The source code has not been amalgamated. @alexfishgait1234 Please read and follow the Contribution Guidelines.
how can i remove single_include/hnohmann/json.hpp from pull request please?
The source code has not been amalgamated. @alexfishgait1234 Please read and follow the Contribution Guidelines.
The source code has not been amalgamated. @alexfishgait1234 Please read and follow the Contribution Guidelines.
[Describe your pull request here. Please read the text below the line, and make sure you follow the checklist.]
we need some json functionality completely without any memory allocations. That means passing allocators als template parameter to different classes: parser,binary_reader,inputadapter,sax_dom_parser,lexer. json functions that need to use custom memory allocator: to_bson;from_bson;parse. Some std containers in lib are not allocator aware: -std::vector token_string - lexer
-std::vector<BasicJsonType> ref_stack - json_sax.hpp
we need 2 types of allocator as template parameter : basic_json and char_type(char)
there are also make_shared ptr in output adapter which should be replaced with allocate_shared.
some other minor conversions functions which allocate.
usage from our client code will be as follows: namespace rtjson { using json = nlohmann::basic_json<std::map, std::vector, sqp::core::rtutils::RtString, //use rtstring bool, long long, unsigned long long, double, sqp::core::memory::PolymorphicAllocator, //use polymorpic allocator
} // namespace ext
using json = rtjson::json;
Pull request checklist
Read the Contribution Guidelines for detailed information.
include/nlohmann
directory, runmake amalgamate
to create the single-header filessingle_include/nlohmann/json.hpp
andsingle_include/nlohmann/json_fwd.hpp
. The whole process is described here.Please don't
#ifdef
s or other means.