Reputation: 11
I've json object ( this json object returned from database):
{ created_at: 'Wed Nov 21 19:28:24 +0000 2012', id: 271334264140869630, id_str: '271334264140869633', }{ created_at: 'Wed Nov 21 19:28:24 +0000 2012', id: 271334264140869630, id_str: '271334264140869633', }
When I've use JSON.stringify(obj) ->
{ "created_at": "Wed Nov 21 19:28:24 +0000 2012", "id": "271334264140869630", "id_str": "271334264140869633" }{ "created_at": "Wed Nov 21 19:28:24 +0000 2012", "id": "271334264140869630", "id_str": "271334264140869633" }
This obj invalid on http://jsonlint.com/, because error:Expecting 'EOF', '}', ',', ']'
Pls help me fix this error.
Upvotes: 0
Views: 666
Reputation: 10705
Below is your valid JSON.
[
{
"created_at": "WedNov2119: 28: 24+00002012",
"id": 271334264140869630,
"id_str": "271334264140869633"
},
{
"created_at": "WedNov2119: 28: 24+00002012",
"id": 271334264140869630,
"id_str": "271334264140869633"
}
]
This is the jsfiddle to test stringify operation
Upvotes: 1