Open CosmoProf opened 3 years ago
It's the same syntax regardless of the object being saved. JLSO doesn't really care about what the objects are as long as the underlying serialization format can handle it (e.g., :bson
vs :julia_serialization
). The save options are just keywords as you'd expect. Here's an example of how we generate our test files for each new JLSO file format version released.
https://github.com/invenia/JLSO.jl/blob/master/test/test_data_setup.jl#L34
In that case, we're passing a dict cause that's more convenient, but pairs will also work.
Hi, what is the syntax needed to use JLSO.save to save other objects, like arrays , ODEsolutions, etc.? And how does one save using different options, like format=:julia_serialize, etc.?
There is only one example in the documentation,
JLSO.save("breakfast.jlso", "food" => "☕️🥓🍳", "cost" => 11.95, "time" => Time(9, 0))
, and this does not clarify the general syntax for how to save data structures.Thanks for any info.