Is this page helpful?
YesNoLast Updated on : 2022-03-03 07:20:25download
This topic describes how a complex data point (DP) of raw or string type is parsed in a standard format. The standard DP data parsing rules can help address the compatibility issues that might occur when you apply the raw or string DP data to function definition across categories, control panel development, cloud development, and data analytics.
F
is used to represent the length of a field. One F
denotes one byte.Data type
Type | Parameter | Description | Example |
---|---|---|---|
Boolean | bool | Represent a binary variable value that is either true or false. | On/off control. Turn a device on or off. |
Value | value | Apply to the data that can be linearly adjusted. | Adjust the temperature, ranging from 20°C to 40°C. |
Enum | enum | A custom finite set of values. | Change the working level in terms of high, medium, and low. |
Weekly data | week | Transmit data in a raw binary format. | Specify the day(s) of the week on which a task will be run. |
String | string | Transmit the data as a string. | None |
Bit | bit | Transmit data in a raw binary format. | Indicate which bit is valid from bit 0 to bit 7. |
{
"bs2":[
{
"bs22":{
"langKey":"30d7e1f1",
"type":"string",
"value":[
17
]
}
},
{
"bs22":{
"langKey":"30d7e1f1",
"type":"string",
"value":[
34
]
}
}
],
"bs1":{
"langKey":"5165502",
"type":"enum",
"value":{
"value":[
2
]
}
},
"bs4":[
{
"bs44":{
"langKey":"731d3b7e",
"type":"string",
"value":[
85
]
}
},
{
"bs44":{
"langKey":"731d3b7e",
"type":"string",
"value":[
17
]
}
},
{
"bs44":{
"langKey":"731d3b7e",
"type":"string",
"value":[
17
]
}
},
{
"bs44":{
"langKey":"731d3b7e",
"type":"string",
"value":[
17
]
}
}
],
"bs3":[
{
"bs33":{
"langKey":"d372e06a",
"type":"string",
"value":[
51
]
}
},
{
"bs33":{
"langKey":"d372e06a",
"type":"string",
"value":[
68
]
}
}
]
}
langKey
that is used for multilingual text is parsed by using the Dubbo API.{
"langKey":"d372e06a",
"type":"string",
"value":[
51
]
}
langKey
: the language identifier, used for multilingual texts.type
: the data type, which can be string
or value
.value
: an int array.{
"langKey":"d372e06a",
"type":"week",
"value":[
1,0,0,0,0,0,0
]
}
langKey
: the language identifier, used for multilingual texts.type
: the data type is week
.value
: an int array from bit 0 to bit 6, representing Monday to Sunday. In the example above, 1,0,0,0,0,0,0
means a task is scheduled to be run on Monday.{
"langKey":"5165502",
"type":"enum",
"value":{
"langKey":"d372e06a",
"value":[
2
]
}
}
langKey
: the language identifier, used for multilingual texts.type
: the data type can be enum
or bool
.value
: a JSON object.langKey
: the language identifier, used for multilingual texts. If value
is not populated with a predefined value, it will be empty.value
: an int array.{
"langKey":"2ecbe5e2",
"type":"bit",
"value":{
"bit7":{
"langKey":"8ebb4416",
"index":7,
"type":"boolean",
"value":{
"langKey":"2d3975fd",
"value":[
0
]
}
},
"bit5":{
"langKey":"d0cc3145",
"index":5,
"type":"boolean",
"value":{
"langKey":"2d3975fd",
"value":[
0
]
}
},
"bit6":{
"langKey":"fc9a8919",
"index":6,
"type":"boolean",
"value":{
"langKey":"2d3975fd",
"value":[
0
]
}
},
"bit3":{
"langKey":"c978dd00",
"index":3,
"type":"boolean",
"value":{
"langKey":"7f18c924",
"value":[
1
]
}
},
"bit4":{
"langKey":"15d5ee1e",
"index":4,
"type":"boolean",
"value":{
"langKey":"7f18c924",
"value":[
1
]
}
},
"bit1":{
"langKey":"50b1a328",
"index":1,
"type":"boolean",
"value":{
"langKey":"7f18c924",
"value":[
1
]
}
},
"bit2":{
"langKey":"18d3937b",
"index":2,
"type":"boolean",
"value":{
"langKey":"2d3975fd",
"value":[
0
]
}
},
"bit0":{
"langKey":"801acde4",
"index":0,
"type":"boolean",
"value":{
"langKey":"2d3975fd",
"value":[
0
]
}
}
}
}
langKey
: the language identifier, used for multilingual texts.type
: the data type is bit
.value
: the value of a field, in JSON. The bit
field is a composite field with eight sub-fields included. The key of a JSON object is an identifier of a sub-field.Contents of a sub-field:
langKey
: the language identifier of a sub-field, used for multilingual texts.index
: the sequence number.type
: the data type of a sub-field, which is bool
.value
: the value of a sub-field (multi-language supported).langKey
: the language identifier of the value of a sub-field.value
: the value of a sub-field, an int array. The valid value can be either 0
or 1
.[
{
"a":{
"langKey":"266edefb",
"type":"string",
"value":[
12
]
},
"d":{
"langKey":"01f1e022",
"type":"string",
"value":[
18
]
}
},
{
"a":{
"langKey":"266edefb",
"type":"string",
"value":[
12
]
},
"d":{
"langKey":"01f1e022",
"type":"string",
"value":[
18
]
}
}
]
Is this page helpful?
YesNoIs this page helpful?
YesNo