NASA-PDS / mi-label

Metadata Injector for PDS Labels (MILabel) provides a command-line interface for generating PDS4 Labels using a user provided PDS4 XML template and input (source) data products.
https://nasa-pds.github.io/mi-label/
Other
3 stars 1 forks source link

As a user, I want to provide metadata in JSON files #84

Open rgdeen opened 2 weeks ago

rgdeen commented 2 weeks ago

Checked for duplicates

No - I haven't checked

🧑‍🔬 User Persona(s)

Template developer

💪 Motivation

The current support for JSON metadata input works only for items at the top level of the JSON. Substructures like arrays, maps, etc don't work consistently. I have a use case (for CLPS-SCALPSS) that has a rather rich JSON structure that is inaccessible in the current implementation.

📖 Additional Details

No response

Acceptance Criteria

Given When I perform Then I expect

⚙️ Engineering Details

Current code tries to shoehorn the JSON parse tree into PDS3Label structure to make it look more like PDS3. However, this is incomplete and inconsistent, and it turns out that just providing the parse tree directly to the JSON engine works much better.

🎉 I&T

See PR for test