[occi-wg] JSON rendering issue
Boris Parak
xparak at mail.muni.cz
Sat Jan 18 11:10:29 EST 2014
Hi Jean,
I don't think this is ambiguous in any way. The definition of string in JSON is:
A string is a sequence of zero or more Unicode characters, wrapped in
double quotes, using backslash escapes. [http://www.json.org/]
Hence:
{ "default":
{ "type": "string" }
}
is "default.type" with value 'string'
and
{ "default":
"{ \"type\": \"string\" }"
}
is "default" with value '{ "type": "string" }'
Or am I missing something?
Cheers, Boris
On Sat, Jan 18, 2014 at 2:40 PM, Jean Parpaillon
<jean.parpaillon at free.fr> wrote:
> Hi,
> I've spent some hours implementing the rendering of resources attributes
> as defined in JSON spec and, finally, I think it can _not_ be done that
> way because its ambiguous.
> Let me give an example:
> let the following json document:
> { "attributes":
> { "com":
> { "example":
> { "default":
> { "type": "string" }
> }
> }
> }
> }
>
> Parsing this document, one can not say if this defines:
> - an attribute "com.example" with default value '{ "type": "string" }'
> - an attribute "com.example.default" with type "string"
>
> Given the interest of the community in JSON rendering and their
> implementations, I think we should quickly solve this issue and agree on
> a right syntax.
>
> Cheers,
> --
> 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
More information about the occi-wg
mailing list