I am trying to create a full JSON representation of Scan:
Scan
Id: 3
article: 3
user: 1
created_at: 2015-05-04
is_purchased: true
Article
id: 3
title: Lelles bread
brand: Bear
quantity: 5.243
entity: oz
created_at: 2014-04-21
User
id: 1
firstName: Frans
lastName: Anderson
userName: FRAN
mail: [email protected]
Is this JSON representation correct?
{
"id": 3,
"article": [
{
”id”: 3,
”title”: ”LellesBread”,
”brand”: ”Bear”,
”quantity”: 5.243,
”entity: ”oz”,
”created_at”: ”2014-04-21”
}
{
”id”: 3,
”title”: ”LellesBread”,
”brand”: ”Bear”,
”quantity”: 5.243,
”entity: ”oz”,
”created_at”: ”2014-04-21”
}
{
”id”: 3,
”title”: ”LellesBread”,
”brand”: ”Bear”,
”quantity”: 5.243,
”entity: ”oz”,
”created_at”: ”2014-04-21”
}
]
"user": {
”id”: 1,
”firstName”: ”Frans”,
”lastName”: ”Anderson”,
”UserName”: ”FRAN”,
”mail”: ”[email protected]”
}
"created_at": "2015-03-14",
"is_purchased": "true"
}
No, it has errors. Use the JSON lint checker at http://jsonlint.com copy and paste your data.
Parse error on line 4:
... { ”id”: 3,
----------------------^
Expecting 'STRING', '}'