THCLab / oca-ecosystem

European Union Public License 1.2
3 stars 0 forks source link

Producing an OCA Bundle that is a single JSON structure vs. set of JSON files in a zip file #5

Open swcurran opened 2 years ago

swcurran commented 2 years ago

I'm trying to understand why the OCA Bundle is a set of JSON files in a ZIP file vs. just a single JSON file that contains a set of overlays?

For example, when we use in a piece of software (say, a wallet), we want the JSON to be in this form, which is a single JSON file that is:

{
    "capture_base": {
        "type": "spec/capture_base/1.0",
        .
        .
        .
    },
    "overlays": [
        {
            "capture_base": "EfeQBz5tyC0gett-ETgkg4pkxBwwuQoeYsT-9Nt0cNsc",
            "type": "spec/overlays/meta/1.0"
             .
             .
             .
    ]
}

We currently plan on have the code that retrieves a bundle convert it to the single JSON structure format for internal use. Is there a good reason to pass it around as a zipped set of JSON files and leave the JSON assembly to later in the process?

blelump commented 2 years ago

There's actually no reason against to have it like you propose. Initially it was easier to operate with ZIP files as they might contain files, so independent data structures that might not be a JSON. Now, since OCA bundle contains JSON's and it is consistent across all the elements in the bundle, we might have a JSON/YAML or any other format of this kind.

swcurran commented 2 years ago

It would be good to nail this down in the spec. While we can have other formats, do we need to them? Implementation is easier IMHO, if we reduce unnecessary choices.