Amazon Ion Schema defines a grammar and constraints for narrowing the universe of Ion values. A schema consists of zero or more types, and a type is a collection of zero or more constraints over the Ion data model. Aspects of a value not constrained by a type (“open content”) are considered valid, which enables loosely-coupled systems to evolve independently.

Once defined, a type can be used to:

For more information, see the Ion Schema Specification.

Latest News

Ion Schema Kotlin 1.1 Released
14 July 2020

This release provides access to the ISL underlying Schema and Type objects, enables custom schema caching logic, provides graceful handling of redundant imports, and more.

Release Notes Ion Schema Kotlin

Ion Schema Kotlin 1.0 Released
15 July 2019

This release is a complete implementation of the Ion Schema Specification.

Release Notes Ion Schema Kotlin

Visit the News page for more announcements related to Ion Schema.

Ion Schema Example

  name: Person,
  type: struct,
  fields: {
    title: {
      type: symbol,
      valid_values: [Mr, Mrs, Miss, Ms, Mx, Dr],
    firstName: { type: string, occurs: required },
    middleName: string,
    lastName: { type: string, occurs: required },
    age: { type: int, valid_values: range::[0, 130] },

The following values are valid for the type Person:

  firstName: "Susan",
  lastName: "Jones",
  title: Mr,
  firstName: "Jonah",
  middleName: "Q.",
  lastName: "Smith",
  age: 34,

The following values are not valid for the type Person:

  firstName: "Cathy",        // lastName is required
  title: Prof,               // Prof is not a valid value for the title field
  firstName: "Jasmine",
  lastName: "Bradford",
  firstName: "Shami",
  lastName: "Ahmed",
  age: 131,                  // age must be between 0 and 130, inclusive