{"id":57,"date":"2018-08-22T10:27:00","date_gmt":"2018-08-22T10:27:00","guid":{"rendered":"https:\/\/www.json-buddy.com\/blog\/?p=57"},"modified":"2022-10-10T10:31:01","modified_gmt":"2022-10-10T10:31:01","slug":"json-editor-and-validator-for-large-schemas","status":"publish","type":"post","link":"https:\/\/www.json-buddy.com\/blog\/2018\/08\/22\/json-editor-and-validator-for-large-schemas\/","title":{"rendered":"JSON editor and validator for large schemas"},"content":{"rendered":"\n<p>Sometimes it can happen that a JSON schema is generated from existing data and the resulting schema is quite huge. And maybe this schema is just taken as a starting point and you need to extend or modify it to get the final specifications for your JSON input.<\/p>\n\n\n\n<p>One example of a really huge JSON schema is the Ansible schema available from schemastore.org (Please take a look at <a href=\"https:\/\/www.json-buddy.com\/blog\/2018\/04\/06\/all-your-json-schema-are-belong-to-us\/\" target=\"_blank\" rel=\"noopener\">this <\/a>blog entry to see how easy it is to open any schema from schemastore.org in JSONBuddy). The Ansible schema has currently more than 100.000 lines and 5 MB of JSON text. For this task, you need a <strong><a href=\"https:\/\/www.json-buddy.com\" target=\"_blank\" rel=\"noopener\">good JSON editor<\/a><\/strong> which can also handle quite large files.<\/p>\n\n\n\n<h2>JSONBuddy: The editor for large JSON schemas<\/h2>\n\n\n\n<p>JSONBuddy is capable of loading big schema documents. The editor will apply syntax-coloring, entry-helpers and code folding as it does for a typical schema. You also don&#8217;t have to work on your schema without the context-sensitive help of getting the specification text for the keyword you are currently editing. All of this is also functional for big schemas.<\/p>\n\n\n\n<p>But there is more. For example,&nbsp;<strong>besides being able to edit a JSON schema as you are used to<\/strong>, you get an instant evaluation from the built-in JSON schema analyzer. The schema analyzer runs in the background and is also active for large schema documents. For example, if a certain definition is not used in the local schema, there is no need to run an explicit find operation:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.json-buddy.com\/blog\/wp-content\/uploads\/2018\/08\/ansible-huge-schema-definition.png\" alt=\"\" class=\"wp-image-200\"\/><figcaption>Inserting a new definition in a JSON schema with more than 100k lines<\/figcaption><\/figure>\n\n\n\n<p>And this also works the other way around, whenever you add a $ref keyword to your JSON schema in the editor, the analyzer will tell you if the referenced definition can be successfully resolved.<\/p>\n\n\n\n<p>&#8220;And do I get those nice validation error indicators which are saving so much time on editing my JSON content in the editor?&#8221; Yes, you do:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.json-buddy.com\/blog\/wp-content\/uploads\/2018\/08\/ansible-background-validation.png\" alt=\"\" class=\"wp-image-201\"\/><figcaption>Active background validation on using a huge JSON schema<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes it can happen that a JSON schema is generated from existing data and the resulting schema is quite huge. And maybe this schema is just taken as a starting point and you need to extend or modify it to get the final specifications for your JSON input. One example of a really huge JSON &hellip; <a href=\"https:\/\/www.json-buddy.com\/blog\/2018\/08\/22\/json-editor-and-validator-for-large-schemas\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">JSON editor and validator for large schemas<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[18,3],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/posts\/57"}],"collection":[{"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=57"}],"version-history":[{"count":2,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":59,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/posts\/57\/revisions\/59"}],"wp:attachment":[{"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.json-buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}