Generate a python parser for a particular JSON format -


i'm using file format. format is, effectively, json particular structure. format comes validator, great, , gives helpful error messages. however, validator fails when error causes input invalid json, , gives poor error message.

i can use normal json validator, want able put json structure tool, , (python) parser out of other end. there various ways of doing this, question is: there ways of defining json format let me avoid writing parser json itself?

the use case this: build 'proper' validator format, user can upload file , have checked. can write bnf, i'd write bnf tool understand bnf-within-json.

the appropriate way assert json file follows particular format use json schema. supported across many languages , has libraries in python. there's helpful online tools generate, validate, , test schema.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -