I propose to design specs for data representation of responses in JSON and XML format in XPCA
I suppose to take for basic the decision in my library
https://github.com/flipback/lipa-web. (see README.md part 'Formats')
I think that response must consist from 2 parts/
First part is metadata which consists of name, full path, link of parent and link of children. This information will provides to validate responses and it will support the discovery. model We must standardize structure and content for this part.
Second part is a actually data. Spec will not cover content of data, but It will define structure and formats of response. Also we can develop other specification for define content this part for typical objects such as analog point, discrete point and etc.
I propose this struct from LipaWeb:
JSON
[returned]
meta-data---------------------------------
{
"name":"some_node",
"fullname": "/parent_node/some_node",
"parent": { "name":"parent_node", "fullname":"/parent_node" },
"children": [
{ "name":"children_node_1", "fullname":"/parent_node/some_node/children_1"},
{ "name":"children_node_2", "fullname":"/parent_node/some_node/children_2"},
]
data----------------------------------------
"param_1":23,
"param_2":"some string"
........
}
XML
<node>
meta-data---------------------------------
<name>some_node</name>
<fullname>/parent_node/some_node</fullname>
<parent>
<name>parent_node</name>
<fullname>/parent_node</fullname>
</parent>
<children>
<child>
<name>child_node_1</name>
<fullname>/parent_node/some_node/children_1</fullname>
</child>
<child>
<name>child_node_2</name>
<fullname>/parent_node/some_node/children_2</fullname>
</child>
</children>
data-----------------
<param_1>23</param_1>
<param_2>some string</param_2>
I will try to write draft of this spec if you allow me.
Thanks,
Aleksey.