hyperhyperspace/hyperhyperspace-core

Dump and restore spaces to JSON

sbazerque opened this issue · 0 comments

Dump and restore Hyper Hyper Space spaces to and from JSON literals.

So starting from the space's entry point, it should be possible to dump all its internal state into a single JSON-encoded string. The JSON should have enough metadata to recover the space without any additional information. This is fairly similar to what Context and specially LiteralContext do. It may be easier to go through a (memory-backed?) store to do the saving, and then using its contents to populate a LiteralContext to be included in the generated JSON. For loading it up back again, maybe it would be easier to load the contents of the LiteralContext back into a store (may be optional - if omitted we could just create a memory-backed one) than attempting to populate all the objects recursively automatically.

The generated JSON could be a first file format for importing / exporting spaces to and from files.