Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread JSON
Fri, Nov 2 2012 12:30 PMPermanent Link

Ronald

Hi,

I use my own server application that send json to my EWB app. It sends :

{   "rows": [
{ "No": 1, "Name": "The Bends", "Artist": "Radiohead", "Genre": "Rock",
"Year": 1995, "Label": "EMI Records", "Imported": False, "NumDiscs": 1,
"CoverArt": "albums.dat?method=load&column=CoverArt&row=1", "Comments":
"Excellent second release by Radiohead with more of a rock sound than some
of their later albums.", "PurchasedOn": "8-4-1997", "PurchasePrice":
12,99 },

and more of course...

The EWB app responds with Expected , instead found 99 at 378 (it seems to
misinterpret the Purchuseprice)

I am from the Netherlands so the format of the JSON is Dutch so I tried
FormatSettings.DecimalSeparator:=',' in my EWB app, but that does not help.
What am I doing wrong here?

Greetings,
Ronald
Fri, Nov 2 2012 12:47 PMPermanent Link

Peter

Hello Ronald,

perhaps your JSON is invalid. Try http://jsonlint.com/ to validate it.

Greetings ... Peter
---
Sorry for my weird english
Fri, Nov 2 2012 1:14 PMPermanent Link

Raul

Team Elevate Team Elevate

I'm don't believe you cannot send the price as 12,99 as in the example. It has nothing to do with the format settings but JSON specification - it requires numbers to be specified with "." and comma separates objects. Either send it as proper number or send as string in which case it gets quoted.

Raul
Mon, Nov 5 2012 2:45 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Ronald,

<< I am from the Netherlands so the format of the JSON is Dutch so I tried
FormatSettings.DecimalSeparator:=',' in my EWB app, but that does not help.
What am I doing wrong here? >>

Raul is correct - the JSON specification states that floating-point numbers
must use a period (.) decimal separator.

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Nov 6 2012 2:23 AMPermanent Link

Ronald

Thank you, I have put them between '"' and that worked fine.

"Tim Young [Elevate Software]"  schreef in bericht
news:EF1C6CBF-A7FF-4E6D-B9AA-07C7EA8B8476@news.elevatesoft.com...

Ronald,

<< I am from the Netherlands so the format of the JSON is Dutch so I tried
FormatSettings.DecimalSeparator:=',' in my EWB app, but that does not help.
What am I doing wrong here? >>

Raul is correct - the JSON specification states that floating-point numbers
must use a period (.) decimal separator.

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com
Image