Adobe AEM
All tools

Developer Tool

Content Fragment ↔ JSON Schema.

Convert a Content Fragment Model export to a JSON Schema, or the reverse, to keep both definitions in sync. How to use

JSON Schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Article",
  "description": "A blog article content fragment",
  "type": "object",
  "properties": {
    "headline": {
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "publishDate": {
      "type": "string",
      "format": "date-time"
    },
    "category": {
      "type": "string",
      "enum": [
        "news",
        "sports",
        "tech"
      ]
    }
  },
  "required": [
    "headline",
    "body"
  ]
}

The CF Model JSON shape matches the export from the Content Fragment Model Generator. JSON Schema → CF Model is best-effort — JSON Schema can express things a Content Fragment Model can't, so review the result before importing. Runs entirely in your browser.

Content Fragment ↔ JSON Schema Converter — User Guide

Converts between an AEM Content Fragment Model definition and a JSON Schema. Everything runs in your browser.

CF Model → JSON Schema

Paste the JSON export from the Content Fragment Model Generator (or hand-write one matching that shape) and get back a valid JSON Schema — useful for validating fragment data in a pipeline, or documenting the model for a downstream API consumer.

JSON Schema → CF Model

Paste a JSON Schema and get back a best-effort Content Fragment Model definition. This direction is lossy — JSON Schema can express things a Content Fragment Model can't (nested objects, oneOf/anyOf, complex validation) — so review the result before importing it. The converter maps:

  • string + enum → Enumeration
  • string + format: date/date-time → Date and time
  • number/integer → Number
  • boolean → Boolean
  • object → JSON field
  • everything else → single-line text
  • array → the corresponding field type with "multiple" enabled

Notes

Switching direction re-feeds the current output back in as input, so you can round-trip and inspect how a conversion changes on the way back.