Skip to content

Using custom types for scalars? #596

@kyku

Description

@kyku

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions