Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hexadecimal support #249

Closed
TheAifam5 opened this issue May 22, 2016 · 3 comments
Closed

Hexadecimal support #249

TheAifam5 opened this issue May 22, 2016 · 3 comments
Labels
kind: enhancement/improvement solution: invalid the issue is not related to the library

Comments

@TheAifam5
Copy link

TheAifam5 commented May 22, 2016

Hi,
Would be really nice to add hexadecimal support.

Example:
{ "test1": 0x1, "test2": [0x2, 0x3] }

Regards TheAifam5.

@nlohmann
Copy link
Owner

Hi @TheAifam5, when parsing JSON, this wouldn't comply to RFC 7159. However, you can use hexadecimal numbers in C++ code:

json example = {{"test", 0x1}, {"test2", {0x2, 0x3}}};

@TheAifam5
Copy link
Author

TheAifam5 commented May 22, 2016

Hi @nlohmann,
I know, but would be very useful for example applying patched to program, in Reverse Engineering, in CTFs etc.. :)
Yes i know that is possible to make from C++, but right now impossible from json file. :)

Regards TheAifam5.

@nlohmann
Copy link
Owner

I understand that there may be a scenario for this, but parsing non-compliant JSON files is out of scope for this library. In the end, JSON is about portability, and any deviation from the standard (though handy for some) would result in more problems further down the road, because other libraries would not support these extensions.

@nlohmann nlohmann added the solution: invalid the issue is not related to the library label May 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement/improvement solution: invalid the issue is not related to the library
Projects
None yet
Development

No branches or pull requests

2 participants