PDA

View Full Version : Success property: with quotes or without?



aacoro
16 Jun 2011, 1:28 AM
Hi All,

I'm a little bit confused about the success property of the DataWriter:
Sir Garcia is mentioning in his book that the minimum return for the DataWriter must be:


{ success : true }

But is this valid?? Should it not be:


{ "success" : true }

Thanks and sorry for the nooby question :">

diegotdai
16 Jun 2011, 1:43 AM
property names should always be a string, and so be wrapped with double quotes.
{ success: true } is invalid. Read more at http://www.json.org/

There is also a online json validator that I've found.
http://jsonlint.com/

Cheers

aacoro
16 Jun 2011, 1:52 AM
property names should always be a string, and so be wrapped with double quotes.
{ success: true } is invalid. Read more at http://www.json.org/

There is also a online json validator that I've found.
http://jsonlint.com/

Cheers

Thanks, I was filing this question because JsonLint was saying : Expecting String...

Thanks for the confirmation.