Skip to content

Add indexed word to ComplexAlgebra #18

@Methrat0n

Description

@Methrat0n

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    WordA new word should be add to the algebraenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions