Point 点信息
结构声明
- TS Declaration
- Java Class
- JSON Schema
interface Point {
"concept": "Point", // 产品概念
"x": number, // x
"y": number, // y
}
class PointTreeNode {
ConceptEnum concept; // 产品概念
double x; // x
double y; // y
}
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/Point",
"definitions": {
"Point": {
"type": "object",
"properties": {
"concept": {
"type": "string",
"const": "Point"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"required": [
"concept",
"x",
"y"
],
"additionalProperties": false
}
}
}
示例
简单示例
- JSON
- YAML
{
"concept": "Point",
"x": 2.5,
"y": 3
}
concept: Point
x: 2.5
y: 3