json_struct icon indicating copy to clipboard operation
json_struct copied to clipboard

json_struct is a single header only C++ library for parsing JSON directly to C++ structs and vice versa

Results 6 json_struct issues
Sort by recently updated
recently updated
newest added

how can I setenum defaults like this JS_ENUM(Color, Red = 0x01, Green = 0x02, Blue = 0x03, Yellow4 = 0x04, Purple = 0x05) struct ColorData { Color color; JS_OBJ(color); };...

Hi, I really like your library. I think it provides a really elegant interface for serializing and deserializing json. I would like to propose adding a feature that I think...

i try to serial a class like this, ```c++ class a{ public: std::string b; } JS_OBJ_EXT(a,b); ``` ```c++ a my_a; auto json_string_a = JS::serializeStruct(my_a); ``` it works fine. but when...

I got these after just caling ./build.sh: ```[ 16%] Building CXX object examples/CMakeFiles/11_calling_functions.dir/11_calling_functions.cpp.o In file included from /tmp/json_struct/examples/11_calling_functions.cpp:5: In function 'int JS::Internal::ft::integer::to_buffer(T, char*, int, int*) [with T = int]', inlined...

Hi, would you be interested in having json_struct be available as a conan package? If so, I can submit a pull request adding the conan recipe. Then you could submit...

``` static void from(const fromCustomType&, Token& token, Serializer& serializer) { Map nestedMap; JS::ParseContext parseContext; nestedMap.setValue("innerKey1", parseContext, "value1"); nestedMap.setValue("innerKey2", parseContext, 42); Map outerMap; outerMap.setValue("regularKey", parseContext, "simpleValue"); outerMap.setValue("mapKey", parseContext, nestedMap); TypeHandler::from(outerMap, token,...