XPCA spec for JSON and XML

56 views
Skip to first unread message

flipback

unread,
Nov 17, 2011, 6:29:38 PM11/17/11
to xp...@googlegroups.com
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>
</node>

I will try to write draft of this spec if you allow me.

Thanks, 
Aleksey.

Tom Tuddenham

unread,
Nov 18, 2011, 5:56:45 PM11/18/11
to xp...@googlegroups.com
Sounnds good. I worry that the metadata model might be too "heavy" for
small devices, but the whole point of doing the XPCA-Spec thing is to
get feedback and develop consensus. So yes, please write up the Spec.
Excellent.

I'll have a good look at Lipa-Web over the weekend so I can get my
head around how you are doing things.

-Tom

Tom Tuddenham

unread,
Nov 18, 2011, 5:57:36 PM11/18/11
to xp...@googlegroups.com
Oh.. and you don't have to ask my permission to write a Spec :)

ferrisoxide

unread,
Sep 8, 2015, 10:29:03 PM9/8/15
to xpca
One possibility, in line with more recent JSON conventions, is that we adopt an existing standard. I've used JSON-API quite a bit in web app development, but maybe something like HAL (http://stateless.co/hal_specification.html) - which has both JSON and XML specifications - would be more useful.

Thoughts? Comments? 

Tallak Tveide

unread,
Sep 9, 2015, 4:06:03 AM9/9/15
to xp...@googlegroups.com
Do you know anything about this?

Website: xpca.org Status: Site Potentially Harmful. Immediate Action
is Required. Web Trust: Blacklisted (10 Blacklists Checked): Indicates
that a major security company (such as Google, McAfee, Norton, etc) is
blocking access to your website for security reasons. Please see our
recommendation below to fix this issue and restore your traffic.
> --
> You received this message because you are subscribed to the Google Groups
> "xpca" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to xpca+uns...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Tom Tuddenham

unread,
Sep 9, 2015, 4:15:48 AM9/9/15
to xp...@googlegroups.com
It's quite possible the site was hacked. The server that's running on was compromised a while back. I thought I'd fixed all these, but clearly not. 

OK. Thanks for the heads up. I'll have a look at it shortly. Bugger.

Cheers
Tom
Reply all
Reply to author
Forward
0 new messages