Skip to content

Primitive types #23

Closed
Closed
@DrAWolf

Description

@DrAWolf

I am missing the equivalent of
BOOST_CLASS_IMPLEMENTATION(MyClass, primitive_type)

Example:
I have classes that already know how to convert to/from a string.
so I use

template<class Archive>                                 
void save( Archive& archive ) const                         
{                                                                           
    archive( ToString() );              
}          

resulting in the JSON

"testobject": {
    "value0": "testobjectAsString"
}

but WHAT I WANT is just a single line

"testobject": "testobjectAsString"

Remark: the same thing happens for ENUMs in your implementation.
They are always saved as a 2-level object, which seems unnecessary.


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions