Description
Serialize an object containing type boolean and const equal to the supplied Boolean value as schemaJson.
A JSON Schema keyword expresses one constraint on an instance. Required-list membership, property naming, numeric bounds, and enum contents are distinct checks within a larger schema.
Serialize an object containing type boolean and const equal to the supplied Boolean value as schemaJson.
When to use this tool
Use JSON Schema Boolean Const Literal when you need one explicit schema-keyword or membership component.
How to use the tool and how it works
- Enter value. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read schemaJson. Use the output convention below.
Serialize an object containing type boolean and const equal to the supplied Boolean value as schemaJson.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| value | Value | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| schemaJson | Schema Json | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"value": true
},
"output": {
"schemaJson": "{\"type\":\"boolean\",\"const\":true}"
}
} Limitations and assumptions
- This builds one small schema fragment; no instance validation or schema dialect declaration is added.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Validate the complete schema and instance using the intended dialect before treating a local check as conformance.
References
Similar or alternative tools
- JSON Schema Exclusive Bound Token
Choose minimum, exclusiveMinimum, maximum, or exclusiveMaximum from lower and exclusive, returning the supplied value alongside the keyword.
- JSON: JSON Schema Nullable Enum Flag
Parse enumJson as a nonempty array, then return its length and whether any value is literal null.