Replies: 1 comment
-
Added in #1930 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
dump
andload
(and the relateddumps
andloads
) is the (perhaps informal) standard for serialization/deserialization in python. This API is supported by:dumps
andloads
)I propose that we add support for this API at the top level module to align asdf with other serialization packages in python.
This will have the added benefit of simplifying test code and examples.
asdf.dump
exampleFor example writing a dict/tree to a file at the moment can be done with:
this could be replaced with:
Non-lazy
asdf.load
For
load
I propose that we set the default forlazy_load
toFalse
as it would otherwise cause issues for array data:So
load
could by used as follows:Supported "file" argument
To detail a few supported options I suggest that we allow
asdf.load
andasdf.dump
to handle:Additional arguments
We will also want to consider how to handle additional keyword arguments as both
asdf.open
andAsdfFile
(andAsdfFile.write_to
) support a number of useful options that we can map toasdf.load
andasdf.dump
.Beta Was this translation helpful? Give feedback.
All reactions