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

Using custom types for scalars? #596

Closed
kyku opened this issue May 28, 2017 · 1 comment
Closed

Using custom types for scalars? #596

kyku opened this issue May 28, 2017 · 1 comment
Labels
kind: enhancement/improvement solution: wontfix the issue will not be fixed (either it is impossible or deemed out of scope)

Comments

@kyku
Copy link

kyku commented May 28, 2017

I'm serializing some decimal values from database into JSON. In order not to risk loosing precision of database data, I've implemented a C++ class for storing values in fixed decimal form. I'm trying to pass my class as NumberFloatType template parameter to basic_json but it looks like parsing of floating point values is hard coded in lexer::strtof overloads. Are there any "customization points" which could be used to support deserialization of strings into custom basic types like NumberFloatType?

@nlohmann
Copy link
Owner

I'm afraid this is not possible in the moment, and I am not sure how to realize this right now.

@nlohmann nlohmann added the solution: wontfix the issue will not be fixed (either it is impossible or deemed out of scope) label Jul 8, 2017
@nlohmann nlohmann closed this as completed Jul 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement/improvement solution: wontfix the issue will not be fixed (either it is impossible or deemed out of scope)
Projects
None yet
Development

No branches or pull requests

2 participants