StringLiteral 字符串字面量
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface StringLiteral {
"concept": "StringLiteral", // 产品概念
"value": string, // 字面量的值
}
class StringLiteralTreeNode {
ConceptEnum concept; // 产品概念
String value; // 字面量的值
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/StringLiteral",
"definitions": {
"StringLiteral": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "StringLiteral"
},
"value": {
"type": "string"
}
},
"required": [
"concept",
"value"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "StringLiteral",
"value": "Hello World!"
}
concept: StringLiteral
value: Hello World!