String field types

A string field type stores its value as a String java type. It is usually visualized as a textbox.

Two sub-types are available by default:

Type Description

string

Meant for a single line of text. Visualizes as a single-line textbox (input type="text" in HTML).

text

Meant for large text objects. Visualizes as a multi-line textbox (textarea in HTML).

char

Single character. Visualizes as a single-line textbox (input type="text" in HTML).

Example string fields
document-definition:
  name: person
  content:
    - id: firstname
      type: string
    - id: lastname
      type: string
    - id: bio
      type: text
    - id: gender
      type: char

A string can also be used as storage type for an enumeration.