{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/programmes-net/json-schema/programmes-net-json-csv-json-to-csv-schema.json",
  "title": "json-csv.json-to-csv",
  "description": "Convert a JSON array/object to CSV.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/programmes-net-converters-api-openapi.yml#/components/schemas/json-csv.json-to-csv",
  "type": "object",
  "properties": {
    "operation": {
      "const": "json-to-csv"
    },
    "input": {
      "type": "string",
      "description": "The JSON text to convert.",
      "maxLength": 32768
    },
    "options": {
      "type": "object",
      "properties": {
        "delimiter": {
          "type": "string",
          "description": "Field delimiter.",
          "maxLength": 32768,
          "default": ","
        },
        "includeHeaders": {
          "type": "boolean",
          "description": "Emit a header row.",
          "default": true
        },
        "nestedHandling": {
          "type": "string",
          "description": "How to handle nested objects.",
          "enum": [
            "flatten",
            "stringify"
          ],
          "default": "flatten"
        }
      }
    }
  },
  "required": [
    "operation"
  ]
}