{"id":250,"date":"2012-07-18T12:04:57","date_gmt":"2012-07-18T10:04:57","guid":{"rendered":"http:\/\/xml-tools.com\/xmltribune\/?p=250"},"modified":"2015-10-14T15:06:43","modified_gmt":"2015-10-14T13:06:43","slug":"json-well-formed-check","status":"publish","type":"post","link":"https:\/\/www.xml-buddy.com\/xmltribune\/json-well-formed-check\/","title":{"rendered":"JSON well-formed checking"},"content":{"rendered":"<p>Whenever you create some JSON output and want to make sure that the generated data\u00a0is really parsable you can take the XML <a href=\"http:\/\/www.xml-buddy.com\/ValidatorBuddy.htm\" >ValidatorBuddy<\/a> editor to quickly check one or many JSON files with just a few clicks.<\/p>\n<p>Select the JSON documents\u00a0you want to check in the built-in File Explorer window of XML <a href=\"http:\/\/www.xml-buddy.com\/ValidatorBuddy.htm\" >ValidatorBuddy<\/a> and use the &#8220;Check if JSON well-formed&#8221; command from the JSON menu.<\/p>\n<div id=\"attachment_253\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/xml-buddy.com\/xmltribune\/wp-content\/uploads\/2012\/07\/jsoncheckcmd1.jpg\"><img aria-describedby=\"caption-attachment-253\" loading=\"lazy\" class=\"wp-image-253 size-medium\" title=\"jsoncheckcmd\" src=\"http:\/\/xml-buddy.com\/xmltribune\/wp-content\/uploads\/2012\/07\/jsoncheckcmd1-300x90.jpg\" alt=\"check json well-formed\" width=\"300\" height=\"90\" srcset=\"https:\/\/www.xml-buddy.com\/xmltribune\/wp-content\/uploads\/2012\/07\/jsoncheckcmd1-300x90.jpg 300w, https:\/\/www.xml-buddy.com\/xmltribune\/wp-content\/uploads\/2012\/07\/jsoncheckcmd1.jpg 333w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-253\" class=\"wp-caption-text\">Command to check well-formed JSON<\/p><\/div>\n<p>And if we have some malformed JSON to check like here:<\/p>\n<p>{<br \/>\n&#8220;root&#8221;:\u00a0{<br \/>\n&#8220;span&#8221;:\u00a0[\u00a0{ &#8220;style&#8221;: &#8220;font&#8221; },\u00a01,\u00a0]<br \/>\n}<br \/>\n}<\/p>\n<p>we get the following error report in the editor:<\/p>\n<div id=\"attachment_254\" style=\"width: 310px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/xml-buddy.com\/xmltribune\/wp-content\/uploads\/2012\/07\/jsoncheck1.jpg\"><img aria-describedby=\"caption-attachment-254\" loading=\"lazy\" class=\"wp-image-254 size-medium\" title=\"jsoncheck\" src=\"http:\/\/xml-buddy.com\/xmltribune\/wp-content\/uploads\/2012\/07\/jsoncheck1-300x104.jpg\" alt=\"json check results\" width=\"300\" height=\"104\" srcset=\"https:\/\/www.xml-buddy.com\/xmltribune\/wp-content\/uploads\/2012\/07\/jsoncheck1-300x104.jpg 300w, https:\/\/www.xml-buddy.com\/xmltribune\/wp-content\/uploads\/2012\/07\/jsoncheck1.jpg 523w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-254\" class=\"wp-caption-text\">Results of JSON well-formed check<\/p><\/div>\n<p>This way you can easily make sure that your JSON data\u00a0is also readable by other applications and also by the JSON validator.<\/p>\n<p style=\"opacity:0.5;padding:0;margin:0;display:inline;\"><sub><a href=\"#\" onclick=\"window.open('https:\/\/www.janhvizdak.com\/rdr.me.1'); return false;\" target=\"_blank\" style=\"cursor:help;\"><b>&#187;crosslinked&#171;<\/b><\/a><\/sub><\/p>","protected":false},"excerpt":{"rendered":"<p>Whenever you create some JSON output and want to make sure that the generated data\u00a0is really parsable you can take the XML ValidatorBuddy editor to quickly check one or many JSON files with just a few clicks. Select the JSON documents\u00a0you want to check in the built-in File Explorer window of XML ValidatorBuddy and use the &#8220;Check if JSON well-formed&#8221;&#8230; <a href=\"https:\/\/www.xml-buddy.com\/xmltribune\/json-well-formed-check\/\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":253,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[4],"tags":[23,67,78],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.xml-buddy.com\/xmltribune\/wp-json\/wp\/v2\/posts\/250"}],"collection":[{"href":"https:\/\/www.xml-buddy.com\/xmltribune\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xml-buddy.com\/xmltribune\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xml-buddy.com\/xmltribune\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xml-buddy.com\/xmltribune\/wp-json\/wp\/v2\/comments?post=250"}],"version-history":[{"count":3,"href":"https:\/\/www.xml-buddy.com\/xmltribune\/wp-json\/wp\/v2\/posts\/250\/revisions"}],"predecessor-version":[{"id":486,"href":"https:\/\/www.xml-buddy.com\/xmltribune\/wp-json\/wp\/v2\/posts\/250\/revisions\/486"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xml-buddy.com\/xmltribune\/wp-json\/wp\/v2\/media\/253"}],"wp:attachment":[{"href":"https:\/\/www.xml-buddy.com\/xmltribune\/wp-json\/wp\/v2\/media?parent=250"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xml-buddy.com\/xmltribune\/wp-json\/wp\/v2\/categories?post=250"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xml-buddy.com\/xmltribune\/wp-json\/wp\/v2\/tags?post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}