-
Notifications
You must be signed in to change notification settings - Fork 3
Description
The actual implementation does not support Maps. This was a choice to release the first beta version faster, but now it's laking.
This definition should be added to ComplexAlgebra :
def indexed[K, V](keySchema: Schema[K], valueSchema: Schema[V]): Schema[Map[K, V]]All implementations for supported formats should be provided in the same PR. Different commits for each would be awesome 👍. A scaladoc should be written above the algebra definition, explaining what should be implemented.
The above definition may not be complete as it will be impossible to serialize a key which is not a String. A context bound on K requesting a Show typeclass would be perfect but it would have to be stole to cats or at least rewritten.
Another approach would be to only allow string as keys. Maybe provide different implicit for other simple types.
If anyone have a better idea on how to implement the key part, contributions would be appreciated.