n8
n8 copied to clipboard
add import / export functions
The serialization code can be taken from https://github.com/erdo/persista
the key lines we'd need are:
val jsonText = json.encodeToString(serializer(stateKType), item)
json.decodeFromString(serializer(stateKType), jsonText) as NavigationState<L, T>
basically make these two (currently ignored) tests in NavigationExtensionsTest pass:
when importing serialized state, state is rewritten correctly
when exporting state, serialized representation is correct