Grooper Help - Version 25.0
25.0.0023 2,165
  • Overview
  • Help Status

JSON File - Load Data

JSON File Command Grooper.EDI

Loads data from a JSON file into a Data Model.

Remarks

The Load Data command imports data from a JSON file and populates the fields and sections of the associated Data Model.

How it Works

  1. The command reads the JSON file attached to the current Batch Folder.
  2. For each field and section in the Data Model, it uses the field or section's Import Source property (a JPath expression) to locate the corresponding value or node in the JSON.
  3. If a match is found, the value is imported; otherwise, the field's default value is assigned.
  4. Section collections (repeating groups) are populated by matching multiple nodes.
  5. Empty or missing sections are removed if their "Miss Disposition" is set to "No Instance".

Tips

  • Set the Import Source property on each field or section to the JPath that matches the desired JSON property or array.
  • The Import Source will automatically be set on Data Models created using the JSON Schema Importer.
  • Use dot notation and array selectors in your JPath (e.g., $.Invoice.Number, $.Invoice.LineItems[*]).
  • Fields without an Import Source will be set to their default value.
  • Section collections will be populated with one instance per matching JSON node.

Example

Suppose your Data Model has a field "InvoiceNumber" with Import Source $.Invoice.Number, and a section "LineItems" with Import Source $.Invoice.LineItems[*].

  • The command will set "InvoiceNumber" to the value of the Number property inside the Invoice object.
  • It will create one "LineItems" section for each item in the LineItems array, mapping child fields using their own Import Source.

See Also

Notification