[occi-wg] JSON specification update

Jean Parpaillon jean.parpaillon at free.fr
Wed Mar 5 05:50:38 EST 2014


Hi Florian,

Le mardi 04 mars 2014 à 12:06 +0100, Florian Feldhaus a écrit :
> Hi Jean,
> 
> thanks for updating the JSON spec (in the json branch :-) ). I agree that source and target should not be repeated, but I would rather not see target and source as attributes as they represent other entities and not just basic data types. I would instead see them as properties and thus not put them in the attributes array. 
> 

I have no particular objection for that, the only point being to avoid
multiple representation. What about your implementation ?
I have implemented target and source as top-level attribute but parsing
understand both representation. 

Do you agree on keeping the only top-level representation ?

> Regarding the collection rendering in JSON I wouldn’t use top level arrays as there are still vulnerabilities around them in JavaScript (see http://haacked.com/archive/2009/06/25/json-hijacking.aspx/). I would instead suggest to create an object with key „locations“ and an array of URIs as value.

Good to know !

Ok for 
{ "locations": [...] }

I'm updating the json spec.


Regards,
Jean

> 
> Cheers
> Florian
> 
> Am 04.03.2014 um 10:57 schrieb Jean Parpaillon <jean.parpaillon at free.fr>:
> 
> > Hi all,
> > I've just updated the JSON representation wrt recent discussion on this
> > ml. It is in redmine.
> > 
> > - Added collection rendering as simple JSON list of URI
> > - Mention multiple representation of entity's occi core attributes.
> > 
> > IMO, multiple representations should be avoided. We should agree on one.
> > I personally vote for including it in other attributes:
> > "attributes": {
> >  "occi": { "core": { "target": "http://example.org..." } }
> > }
> > 
> > 
> > Regards
> > -- 
> > Jean Parpaillon
> > Open Source Consultant
> > Phone: +33 6 30 10 92 86
> > im: jean.parpaillon at gmail.com
> > skype: jean.parpaillon
> > linkedin: http://www.linkedin.com/in/jeanparpaillon/en
> > 
> > _______________________________________________
> > occi-wg mailing list
> > occi-wg at ogf.org
> > https://www.ogf.org/mailman/listinfo/occi-wg
> 

-- 
Jean Parpaillon
Open Source Consultant
Phone: +33 6 30 10 92 86
im: jean.parpaillon at gmail.com
skype: jean.parpaillon
linkedin: http://www.linkedin.com/in/jeanparpaillon/en



More information about the occi-wg mailing list