I've visited previous issues mentioning tuple/user-defined types/etc and I thought it would be awesome if I could do something like this:
json myJSON;
myJSON["stringKey"] = "stringVal";
myJSON["intKey"] = 5;
myJSON["customKey"] = myCustomObj; //this is not really needed for my use case
auto myTuple = myJSON.get<tuple<string, int, MyType /* again, not super necessary */>();
I'm not 100% sure this is the right way about it, but I think my objective is clear: have a way to store/retrieve (serialize/deserialize) a dictionary/map with custom types and then get those types back automagically.
I've visited previous issues mentioning tuple/user-defined types/etc and I thought it would be awesome if I could do something like this:
json myJSON;myJSON["stringKey"] = "stringVal";myJSON["intKey"] = 5;myJSON["customKey"] = myCustomObj; //this is not really needed for my use caseauto myTuple = myJSON.get<tuple<string, int, MyType /* again, not super necessary */>();I'm not 100% sure this is the right way about it, but I think my objective is clear: have a way to store/retrieve (serialize/deserialize) a dictionary/map with custom types and then get those types back automagically.