Как проверить валидность JSON-данных

mstdmstd

Новичок
Всем привет,
в приложении php/javascript/ fabricJS
картинка грузится из файла в переменной _templateData :
stage.loadFromJSON( _templateData, stage.renderAll.bind(stage), function( _object, _klass ) {
( http://fabricjs.com/docs/fabric.Canvas.html )

В некоторый случаях я получаю ошибку типа "token invalid" и просмотривая глазами содержимое файла типа

{"objects":[{"type":"image","originX":"left","originY":"top","left":-0.42,"top":11.51,"width":1240,"height":1724,"fill":"rgb(0,0,0)","stroke":null,"strokeWidth":1,"strokeDashArray":null,"strokeLineCap":"butt","strokeLineJoin":"miter","strokeMiterLimit":10,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"clipTo":null,"backgroundColor":"","fillRule":"nonzero","globalCompositeOperation":"source-over","selectable":true,"lockMovementX":false,"lockMovementY":false,"lockRotation":false,"lockScalingX":false,"lockScalingY":false,"lockUniScaling":false,"src":"http://site.com/static/uploads/themes/flyer/MD01A6001.jpg","filters":[],"crossOrigin":"","alignX":"none","alignY":"none","meetOrSlice":"meet"},{"type":"textbox","originX":"left","originY":"top","left":470.08,"top":437.01,"width":300,"height":419.46,"fill":"rgba(0,0,0,1)","stroke":null,"strokeWidth":1,"strokeDashArray":null,"strokeLineCap":"butt","strokeLineJoin":"miter","strokeMiterLimit":10,"scaleX":1,"scaleY":1,"angle":0,"flipX":false,"flipY":false,"opacity":1,"shadow":null,"visible":true,"clipTo":null,"backgroundColor":"rgba(255,255,255,0)","fillRule":"nonzero","globalCompositeOperation":"source-over","selectable":false,"lockMovementX":true,"lockMovementY":true,"lockRotation":false,"lockScalingX":false,"lockScalingY":true,"lockUniScaling":false,"text":"fgdfg\nfgdsg\nsdfgdfs","fontSize":80,"fontWeight":"normal","fontFamily":"Aclonica","fontStyle":"","lineHeight":1.16,"textDecoration":"","textAlign":"left","textBackgroundColor":"","styles":{"0":{"1":{},"2":{},"3":{},"4":{}},"1":{"0":{},"1":{},"2":{},"3":{},"4":{}},"2":{"0":{},"1":{},"2":{},"3":{},"4":{},"5":{},"6":{},"7":{}}},"minWidth":20}],"background":""}


не могу найти в чем ошибка.
Сравнивая с файлом который грузится нормально я не вижу в чем ошибка.
Нет ли каких тулзов проверить валидность JSON-данных ?

Сорри, а где кнопки выделения кода и цитата?
 

Redjik

Джедай-мастер
Сверху