-
Hi :) I couldn't find any "regular" way with json_array, and I failed to create a working custom constructor :(. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This should work, I added an example in the tests/src/carray_test.cpp . There was an issue that #356 fixes and should be released soon. carray's are not going to be optimal because they cannot be returned from a function, if you can use a std::array it is much simpler and just works. The example parses to a std::array and then copies the elements to the c-array submember. This must be done in the context of the owning classes construction via a custom constructor so that it can be returned. |
Beta Was this translation helpful? Give feedback.
-
This should give an idea of what is needed to use c-arrays |
Beta Was this translation helpful? Give feedback.
This should give an idea of what is needed to use c-arrays
https://github.com/beached/daw_json_link/blob/release/tests/src/carray_test.cpp