Adding basic json types (string, number, object, array, boolean, etc..) to json_fwd.hpp #4776
juhasz2gabor
started this conversation in
Ideas
Replies: 1 comment
-
No, I don't think it is possible. Why are you trying to use the subtypes instead of the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
This feature idea is related to this : #4474
At my company we replace our old json library with nlohman::json. We found that
json_fwd.hpp does not contain the exact json types but just the general json type.
So if we have overloaded functions with different json types we can do it just ugly way,
e.g.
void f(std::map<std::string, nlohmann::json, std::less<>> & jsonObject)
instead of
void f(nlohmann::json::object_t &jsonObject)
or we do not know the exact type of json. It was supported by our old json library.
Can you add the basic json types (object_t, array_t, etc) forward declarations to json_fwd.hpp if it is possible.
Thanks & Kind regards,
Gabor
Beta Was this translation helpful? Give feedback.
All reactions