AlgebraicJulia / DiagrammaticEquations.jl

MIT License
9 stars 1 forks source link

Expand operators before writing JSON #25

Open lukem12345 opened 7 months ago

lukem12345 commented 7 months ago

When a Decapode has composed operators, it will successfully serialize in/ out of JSON. However, when an op1 is a vector of symbols (i.e. a composed operator), it will be parsed in as a Symbol("[\"d\",\"d\"]"), which is not the desired behavior.

This problem can be immediately resolved by calling expand_operators before write_json_acset, but a better solution would overload read_json_acset for the special case of a vector of symbols.

olynch commented 1 month ago

With intertypes, we can serialize an attribute that is a vector of symbols.