Field Types
Thogits supports 7 field types. Each type defines how values are validated and stored. All fields are nullable — omitting a value or setting it to null is always valid.
String
Section titled “String”Free-form text.
"title": "String""title": "My document title"Values must be JSON strings. Numbers, booleans, and other types are rejected.
Number
Section titled “Number”64-bit floating point. Supports integers and decimals.
"score": "Number""score": 42"score": 3.14String representations of numbers (e.g., "42") are rejected.
Boolean
Section titled “Boolean”True or false.
"active": "Boolean""active": trueString representations ("true", "false") are rejected — use bare true or false.
Date or datetime as a string in YYYY-MM-DD or YYYY-MM-DDTHH:MM:SS format.
"due_date": "Date""due_date": "2025-04-15""due_date": "2025-04-15T14:30:00"Date-only values are internally treated as midnight (T00:00:00) for comparison purposes.
Reference
Section titled “Reference”A ULID string pointing to another thogit. This creates a relationship between two thogits.
"project": "Reference""project": "01JQXK6V9XCSV5K9Z1MQSK5RBT"At write time, the system validates that the referenced thogit exists. Invalid ULIDs and dangling references are rejected. References enable traversal queries that filter across relationships.
Select
Section titled “Select”Single selection from an ordered list of variants. Variants can optionally carry their own sub-fields.
"status": { "type": "Select", "variants": [ "Todo", "InProgress", "Done" ]}"status": { "type": "Select", "variants": [ "Todo", { "name": "Blocked", "fields": { "reason": "String", "blocker": "Reference" } }, "Done" ]}"status": { "variant": "Blocked" }When a variant has sub-fields, those values are stored flat alongside other field values in the same tag data:
{ "status": { "variant": "Blocked" }, "reason": "Waiting on API approval", "blocker": "01JQY..."}Key rules:
- Must have at least one variant
- Variant names must be unique within the Select
- Sub-fields on variants follow the same typing rules as top-level fields
- Sub-field values are only validated when their variant is the active selection
MultiSelect
Section titled “MultiSelect”Multiple selections from an ordered list of variants. No sub-fields.
"priority": { "type": "MultiSelect", "variants": ["Low", "Medium", "High", "Critical"]}"priority": ["High", "Critical"]An empty array is valid:
"priority": []Key rules:
- Must have at least one variant defined
- Variant names must be unique
- Values are arrays of variant name strings
- Duplicate selections in a value are rejected
- Variant order defines the ordinal for comparison operators
Summary Table
Section titled “Summary Table”| Type | Schema JSON | Value JSON |
|---|---|---|
| String | "String" | "hello" |
| Number | "Number" | 42 or 3.14 |
| Boolean | "Boolean" | true or false |
| Date | "Date" | "2025-04-15" or "2025-04-15T14:30:00" |
| Reference | "Reference" | "01JQXK6V9X..." |
| Select | {"type":"Select","variants":["A",...]} | {"variant":"A"} |
| MultiSelect | {"type":"MultiSelect","variants":["A","B"]} | ["A","B"] |