Adapted from ADASS 2024 workshop.
Created via a regular dictionary:
af_payload = Dict{Any, Any}( # To-do: see if type signature needs to be this general
"meta" => Dict("my" => Dict("nested" => "metadata")),
"data" => [1, 2, 3, 4],
)
Write and load with ASDF.write_file and ASDF.load_file, respectively:
using ASDF
ASDF.write_file("../data/my_asdf.asdf", af_payload)
af = ASDF.load_file("../data/my_asdf.asdf")
This contains a meta field, which is a dictionary that merges information about this library with af_payload:
af.metadata
af.metadata["asdf/library"]
Supporting custom objects, extensions.
ASDF.NDArrayWrapper(...; inline, compression)