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
Hypergraph JSON de/serialisation #259
Comments
For example, AlgebraicJulia has several schemas that @epatters worked on here: https://github.com/AlgebraicJulia/Catlab.jl/blob/main/src/wiring_diagrams/JSON.jl Given the maturity of the Julia ecosystem I think this can be a great implementation advantage. |
Yes it would be nice to use the same convention as in Catlab! One caveat though is that the schema you refer to only deals with monogamous hypergraphs (see issue #25), i.e. every wire has exactly two ports as endpoints whereas the hypergraphs in DisCoPy have spiders which can connect to an arbitrary number of ports. |
What is the goal of this issue? Is it interoperability? Because just to get a JSON file an option is to take the DiGraph and export using NetworkX: Lines 1094 to 1098 in ec3c570
|
The goal of this issue is de/serialisation so that a This could be done by composing the existing methods The easiest way would be to simply extend the |
DisCoPy already has JSON de/serialisation for the
Diagram
class, see dumps and loads.We need the same feature for the
Hypergraph
class.The text was updated successfully, but these errors were encountered: