-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardised serialisation/deserialisation of data nodes #5464
Comments
cc @louisponet |
I think it would also be useful to have the schemas themselves in a json somewhere, so the other languages can use them too. Maybe there can then be a generic Of course if everything goes through a restapi, that can also simply be requested through a url |
Possibly, but this would be difficult to enforce for plugins, plus having to keep these in a standard place. (as you edited 😉 ) |
For reference: we should consider to use MessagePack as a more efficient serialization format (compared to JSON); also supports binary data. |
For use cases such as the web API and declarative workflows, it would be desirable to have a standardised way to construct/deconstruct data nodes, in a round-trippable and language agnostic manner.
In addition, it would also be helpful for the node to declare a schema for the serialisation, e.g. for client-side validation (this is similar to how https://graphql.org/ works).
For a simple data type, this might be something like:
Note the schema does not necassarily have to have a one-to-one correspondence with how the data is actually stored, e.g. in the attributes field
For data types that store (large) binary data, i.e. in the repository, this is a bit more tricky, since (a) that is not strictly JSONable, and (b) we would want to stream this data, rather than read it into memory.
This may require some kind of extension to standard JSON schema.
The text was updated successfully, but these errors were encountered: