Skip to content

Conversation

@petered
Copy link
Contributor

@petered petered commented Jan 19, 2023

Adds Tuple-handling to the JSONSerializer, using a tuple_deserialization function that will also make it easier for custom serialisers to handle tuples.

Also adds documentation and type-annotations to the Serializer class and the enigmatic RefinementDict.

@petered
Copy link
Contributor Author

petered commented Jan 23, 2023

Hey @madman-bob . I was looking to make a nice general-purpose tool for python serialisation in the coming months, as it seems that serialization is one of those things where people constantly re-invent the wheel. So I was happy to find your PyPi package - which really provides a really nicely written foundation for this. I'm not sure to what extent you want to extend the scope of this package - there're a few things that I'd like to add. I can either add them to this repo, or to another repo with this repo as a dependency.

Can you me know which, if any, you'd consider taking them as PR's in your repo?

  1. This PR (allowing serialisation of, e.g. Tuple[int, str] in default JSONSerializer)
  2. Versioning support (basically a clear protocol for handling backwards/forwards compatibility when your data class changes fields but you still want to be able to load past/future files with current code).
  3. Support for putting multiple objects in a single file, which can be read sequentially and lazily (e.g. read metadata without reading data, or lazily read a stream without reading whole stream on start)
  4. Numpy support (would involve adding numpy, msgpack, msgpack_numpy dependencies)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant