Hi Greg,

Firstly, grats on the article.

Secondly, I know I've been very quiet for a while, but I've been continuing
to watch the mailing lists and haven't felt a need to step in until just
now.

Pivot's use of JSON is really starting to annoy me.  Example:

{
   name : "value"
}

This is NOT valid JSON, but it is both generated and read by Pivot.   The
correct version of this would be:

{
   "name" : "value"
}

This is defined clearly in both the ECMA spec and on the JSON web page:

http://www.ecma-international.org/publications/files/ecma-st/ECMA-262.pdf
http://www.json.org

Which states that

 JSONMember :

     JSONString : JSONValue



A JSONString is:

JSONString ::

    " JSONStringCharacters(optional) "


I have heard the argument for allowing poorly written JSON to be read by
Pivot in the past, but think it is an invalid argument, as I have never seen
anything which produces bad-JSON, apart from Pivot itself.

I know there's a flag called "alwaysDelimitMapKeys", but again I think
it's unnecessary because map keys should always be delimited.

I don't think Pivot is doing the greater community any favours by
encouraging this offshoot of JSON.  Pivot either needs to fix it, or call it
something else, because as it stands (in its weak undelimited form) it's not
JavaScript Object Notation, it's Pivot Object Notation.


Cheers,
Chris


On 26 August 2010 01:05, Greg Brown <gkbr...@mac.com> wrote:

> In case anyone is interested:
>
> http://java.dzone.com/articles/implementing-rest-services
>
>

Reply via email to