|
-
July 31st, 2012, 05:19 AM
#1
JSON format
hi,
I created a function that returns an id field and proverb field in mysql.
Right now my function returns this row:
In xml format this would probably look like this
Code:
<ID>1<\ID>
<Proverb>"The die is cast"<\Proverb>
I would like to know how would this row look like in JSON fomrat?
-
July 31st, 2012, 09:05 AM
#2
Re: JSON format
It would probably be:
Code:
{"ID": 1, "Proverb": "The die is cast"}
or if the double quotes are really part of the Proverb, then:
Code:
{"ID": 1, "Proverb": "\"The die is cast\""}
You should take a look at the syntax's description at json.org.
-
July 31st, 2012, 02:08 PM
#3
Re: JSON format
hm, i guess it is better that i remove double quotes in mysql database.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|