09 ZMongo Content Pack Load JSON File
Load a content pack back from a file on disk
- content_pack
- json
- manifest_json
- aliases
- data_types
- indexed
- success
The flip side of Export JSON File: this node reads a content-pack JSON file back off disk and turns it into a live ZMONGO_CONTENT_PACK you can feed into any Get node, the manifest preview, or another exporter. It's how you consume a pack someone sent you, or rehydrate your own archived bundles without needing the database to still be around.
Inputs
content_pack_file- a path to the JSON file. It also accepts the raw JSON itself: if the string starts with{, the node treats it as inline content rather than a path. That's a nice escape hatch for pasting.validate_schema(default true) - checks theschema_kindbefore importing. With it on, a JSON blob that isn't a recognized content pack is rejected; turn it off and the node tries to force whatever you gave it into a pack.image_policy- how to treat image fields:load_inline(default) - keep whatever image data is embedded.ignore_images- strip image values out, leaving the fields but nulling the pixels. Good when the file is big and you only want the text/numeric fields.require_images- error out if any IMAGE field is missing its data. Good when the images are the whole point.
The loader is smart about what it accepts: it can unwrap a portable envelope or extract a pack embedded inside a workflow JSON (the format Export JSON File produces in workflow_json mode). So one node handles both the bare envelope and the workflow-wrapped version. Files go through os.path.expanduser, so ~/... paths work.
Outputs
content_pack is the wire format for the rest of the system, json is the rehydrated document, manifest_json the manifest. aliases and data_types are the parallel lists, indexed is the alias [type] text dump, and success tells you the load worked.
Common issues
The most frequent failure is a wrong path - the error message is explicit (Portable content pack file not found: ...) and the node returns an empty pack plus success: false rather than crashing, so read the json output for the real message. The second gotcha is schema validation: if someone sent you a raw JSON that isn't a pack (no zmongo_content_pack schema kind), validate_schema: true will refuse it. No session is required - this node is fully offline, which is the whole point of the portable format.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| content_pack_file | STRING | — | |
| validate_schema | BOOLEAN | true | — |
| image_policy | COMBO | load_inline | 3 options: load_inline, ignore_images, require_images |
| refresh_tokenopt | STRING | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| content_pack | ZMONGO_CONTENT_PACK | — |
| json | STRING | — |
| manifest_json | STRING | — |
| aliases | * | — |
| data_types | * | — |
| indexed | STRING | — |
| success | BOOLEAN | — |