enum type can be case-insensitive-mapped with json? #3987
YunchengLiu
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
NLOHMANN_JSON_SERIALIZE_ENUM
provides a tool to map enum and json precisely. I want to know if it can provide a arg to specify enabling case-insensitive-mapping?I think that most of the cases where enum is serialized to json should be ascii strings, so it should be more convenient to provide case-independent conversion in some scenarios, and there should be no need to consider UNICODE at this time.
I implemented it in this simple way (as above), and there seems to be no problem. Is there any other complicated situation that I have not considered?
Beta Was this translation helpful? Give feedback.
All reactions