Tuesday 15 May 2012

javascript - Error shown in json -



javascript - Error shown in json -

i beginner in javascript , building json code website.the problem error messages shown style have used style in code.error message is:` 1:bad template.json: expecting property name: line 24 column 2 (char 530) 2:we encountered next error @ top level of template.json (property style missing.)

the name json file template.json , have used 2 images also.no variable used have created space future use.

{ "id": "first-123", "name": "get paid", "mobile": true, "notes": "initial import; first pass.", "syntax": 4, "version": 1.00, "style": { "replacements": [ { "type": "color", "name": "background color", "find": "#fffffe" } ] }, "elements": [ { "type": "image-link", "id": "img/34769901.jpg", "name": "example 7 image link", "data": { "max-width": 1340 }, { "type": "image-link", "id": "img/34769901.jpg", "name": "example 7 image link", "data": { "max-width": 1340 }, } ], "variables": {} }

remove trailing comma after lastly element in array/hash

"max-width": 1340 }

javascript json

No comments:

Post a Comment