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
Right now there's support for de-serializing types from a string, Would it be interesting to also be able to produce(by serializing) these strings from the type instances?
parser.toString(listWithInt)
parser.toString(listWithBoolean)
parser.toString(mapOfStrings)
Good question! You mean like for List the parser.toString() would strip off the trailing square brackets [] when calling List.toString(), so it can be parsed back again?
I was thinking such serializing functionality could be put in a separate library (perhaps with a dependency towards type-parser?), to avoid increasing the foot-print of the TypeParser library (So the users of only the parse functionality should not be forced to include the code for serializing as well).
Right now there's support for de-serializing types from a string, Would it be interesting to also be able to produce(by serializing) these strings from the type instances?
parser.toString(listWithInt)
parser.toString(listWithBoolean)
parser.toString(mapOfStrings)
example/usecase:
saveState {
savedState = parser.toString(mapOfStrings)
}
loadState {
mapOfStrings = parser.parse(savedState,new GenericType<Map<String,String>(){});
}
The text was updated successfully, but these errors were encountered: