Open sdwfrost opened 4 years ago
This could be a good storage format. I think the hard part would be how to do the Julia expression. Maybe it just works with JSON.jl? @shashi might know some of this because of his webio background.
It should be easy to formalize a schema and implement the serialize deserialize methods. Any schema suggestions are welcome!
I'm working with a platform to run models in the cloud using GitHub Actions (see here, which takes JSON inputs, and expects JSON outputs. Here is an example for a simple DifferentialEquations model (as a Typescript interface, which gets converted into a JSON schema):
where
p
is an array of parameters,u0
is an array of initial conditions, andtspan
is the time over which the simulation is run. At the moment, I read in JSON files to access parameters, etc., but it would be great to have (at least for experimentation) a JSON representation of the ModelingToolkit model itself. I know I could simply include the stringified function as an argument, but that isn't very readable.