You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using visit_struct.hpp to enable auto serialise/deserialise of structs, there's no way to actually deserialise data from disk. If you consider the following:
It will fail with Failed to deserialize object: config is not an object. - since the instance of configuru::Config was constructed from a raw string. So unless I'm missing something, is it not possible to auto deserialise from a raw string?
The text was updated successfully, but these errors were encountered:
To answer my own question. When writing/reading to/from disk, you need to use the provided dump_file/parse_file functions. Previously I was using config.c_str() to write out the raw string.
When using
visit_struct.hpp
to enable auto serialise/deserialise of structs, there's no way to actually deserialise data from disk. If you consider the following:configuru::Config config = configuru::Config(rawJsonString); configuru::deserialize(&testStruct, config, errorReporter);
It will fail with
Failed to deserialize object: config is not an object.
- since the instance ofconfiguru::Config
was constructed from a raw string. So unless I'm missing something, is it not possible to auto deserialise from a raw string?The text was updated successfully, but these errors were encountered: