All products

AI JSON file conversion

Turn a nested export into a table, keep selected fields or combine several JSON lists. Describe the output you need and check it against your rules.

AI JSON file conversion is easiest to specify with one example row. If an order contains an address object and three line items, should your table have one row per order or three rows for the items? With json-transformer you can inspect the structure before choosing what the output represents.

The guide includes ways to reshape an export, combine arrays and check a result against a JSON schema. A validation error can point to a missing field or a value of the wrong type. That can save you from discovering the problem only when another application refuses the finished file.

What it does

  • Flatten nested object fields into named columns.
  • Select a few keys from each record.
  • Filter a list using a condition you supply.
  • Combine several JSON lists into a new output file.
  • Validate required keys and value types against a supplied schema.

Install and use

  1. Install the skill in an agent that can run Python. Table conversions use pandas, and schema validation uses jsonschema.
  2. Choose your input files and describe a representative row. Try “Keep the product ID and colour and write a CSV for our stock sheet.”
  3. Compare a few output rows with the source, especially records missing an optional field.

FAQ

Source

Made by prasad-nimbalkar. Original skill: json-transformer, published on GitHub under the MIT licence.

View on GitHub