{"id":273314,"date":"2016-02-01T11:32:06","date_gmt":"2016-02-01T08:32:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=273314"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=273314","title":{"rendered":"JSON Schema \u0438 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f JSON-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 C++"},"content":{"rendered":"<p>       \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 JSON Schema \u0438 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C++ \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/tristanpenman\/valijson\">valijson<\/a>.<\/p>\n<h5>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438<\/h5>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u0432\u044b\u0442\u0435\u0441\u043d\u0435\u043d\u0438\u044e JSON-\u043e\u043c XML-\u0430 \u0438 \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0431\u044b\u043b\u043e \u043f\u043b\u043e\u0445\u043e\u0433\u043e. XML \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a <em>\u043c\u0435\u0442\u0430\u044f\u0437\u044b\u043a<\/em> <em>\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438<\/em> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0411\u0443\u0434\u0443\u0447\u0438 \u043f\u0435\u0440\u0432\u044b\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430, \u0434\u0430 \u0435\u0449\u0435 \u0438 \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u043c\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0438\u043e\u0434 \u0431\u0443\u0440\u043d\u043e\u0433\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, XML \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0434\u043b\u044f \u0431\u0435\u0441\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0442.\u0435. \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u043e\u043d \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0411\u0443\u0434\u0443\u0447\u0438 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%BA%D0%B0_%D0%BA%D0%BE%D0%BC%D0%B8%D1%82%D0%B5%D1%82%D0%BE%D0%BC\">\u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u043c \u043a\u043e\u043c\u0438\u0442\u0435\u0442\u0430\u043c\u0438<\/a>, \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 XML \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0445, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9F%D1%80%D0%BE%D1%81%D1%82%D1%80%D0%B0%D0%BD%D1%81%D1%82%D0%B2%D0%BE_%D0%B8%D0%BC%D1%91%D0%BD_(XML)\">\u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u043e\u0432 \u0438\u043c\u0435\u043d<\/a> \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c <a href=\"https:\/\/ru.wikipedia.org\/wiki\/XQuery\">\u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/a> \u0432 XML-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0445. \u0418, \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0449\u0435\u0435\u0441\u044f \u043d\u0430\u0433\u0440\u043e\u043c\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u044d\u0433\u043e\u0432 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c \u043d\u0438\u043a\u0430\u043a\u0438\u043c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043c, \u0431\u044b\u043b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0438 \u0448\u0438\u0440\u043e\u043a\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/XML_Schema\">XML Schema<\/a>, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 XML \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0441\u0442\u0440\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0441 \u0446\u0435\u043b\u044c\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438.<\/p>\n<p>  \u0422\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c, \u0432\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e\u0434 \u0432\u043b\u0438\u044f\u043d\u0438\u0435\u043c \u0437\u0430\u0440\u043e\u0436\u0434\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 web-\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439 \u0441\u0442\u0430\u043b\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u044f\u0437\u044b\u043a\u043e\u043c JavaScript, \u0438 \u043e\u043d\u0438 \u043d\u0430\u0447\u0430\u043b\u0438 \u043e\u0441\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0432\u0438\u0434\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0441\u043e\u0442\u0435\u043d \u0441\u0442\u0440\u0430\u043d\u0438\u0446 XML-\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0439. \u0418 \u043a\u043e\u0433\u0434\u0430 \u0414\u0443\u0433\u043b\u0430\u0441 \u041a\u0440\u043e\u043a\u0444\u043e\u0440\u0434 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e JavaScript \u0434\u043b\u044f \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u043d\u043e \u043d\u0435 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432!) \u0431\u0435\u0437\u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u044f\u0437\u044b\u043a\u0443, \u0438\u0434\u0435\u044f \u0431\u044b\u043b\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e\u043c. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f JSON \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0434\u0432\u0443\u0445 (\u0432\u043c\u0435\u0441\u0442\u0435 \u0441 XML) \u044f\u0437\u044b\u043a\u043e\u0432, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0432\u0441\u0435\u043c\u0438 \u0441\u043a\u043e\u043b\u044c\u043a\u043e-\u043b\u0438\u0431\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0422\u043e\u0442 \u0436\u0435 YAML, \u043f\u0440\u0438\u0437\u0432\u0430\u043d\u043d\u044b\u0439 \u0441\u0434\u0435\u043b\u0430\u0442\u044c JSON \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c, \u0432\u0432\u0438\u0434\u0443 \u0441\u0432\u043e\u0435\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 (\u0442.\u0435. \u0448\u0438\u0440\u043e\u0442\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439) \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d \u043d\u0435 \u0442\u0430\u043a \u0448\u0438\u0440\u043e\u043a\u043e (\u0432 \u043c\u043e\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043d\u0435 \u0442\u0430\u043a \u0434\u0430\u0432\u043d\u043e \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0441 YAML \u0438\u0437 MATLAB, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0441 JSON \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e).<\/p>\n<p>  \u0422\u0430\u043a \u0432\u043e\u0442, \u043c\u0430\u0441\u0441\u043e\u0432\u043e \u043d\u0430\u0447\u0430\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JSON \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0438\u0441\u044c \u0441 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0435\u0440\u0435\u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0443 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438. \u041b\u044e\u0434\u0435\u0439, \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u0441 XML Schema, \u044d\u0442\u043e \u043d\u0435 \u043c\u043e\u0433\u043b\u043e \u043d\u0435 \u0431\u0435\u0441\u0438\u0442\u044c. \u0418 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 JSON Schema \u0442\u0430\u043a\u0438 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0438 \u0436\u0438\u0432\u0435\u0442 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443 <a href=\"http:\/\/json-schema.org\/\">http:\/\/json-schema.org\/<\/a>.<\/p>\n<h5>JSON Schema<\/h5>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439, \u0441\u0445\u0435\u043c\u044b, \u0437\u0430\u0434\u0430\u044e\u0449\u0435\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c 2D \u0438\u043b\u0438 3D \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0442\u043e\u0447\u0435\u043a \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 (-1, 1)x(-1, 1)x(-1, 1) \u0441 \u043a\u043b\u044e\u0447\u0430\u043c\u0438, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u043c\u0438 \u0438\u0437 \u0446\u0438\u0444\u0440:<\/p>\n<pre><code>{     &quot;type&quot;: &quot;object&quot;,     &quot;patternProperties&quot;: {         &quot;^[0-9]+$&quot;: {             &quot;type&quot;: &quot;object&quot;,             &quot;properties&quot;: {                 &quot;value&quot;: {                     &quot;type&quot;: &quot;number&quot;,                     &quot;minimum&quot;: 0                 }                 &quot;x&quot;: { &quot;$ref&quot;: &quot;#\/definitions\/point_coord&quot; },                 &quot;y&quot;: { &quot;$ref&quot;: &quot;#\/definitions\/point_coord&quot; },                 &quot;z&quot;: { &quot;$ref&quot;: &quot;#\/definitions\/point_coord&quot; }             },             &quot;required&quot;: [&quot;value&quot;, &quot;x&quot;, &quot;y&quot;]         }     }     &quot;additionalProperties&quot;: false,     &quot;definitions&quot;: {         &quot;point_coord&quot;: {             &quot;type&quot;: &quot;number&quot;,             &quot;minimum&quot;: -1,             &quot;maximum&quot;: 1         }     } } <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u041a\u0440\u043e\u043a\u0444\u043e\u0440\u0434\u0443 \u043d\u0430\u0434\u043e\u0435\u0434\u043b\u0438\u0432\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438, \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0434\u0435\u043b\u043e \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c (\u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c), \u043a\u043b\u044e\u0447\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0446\u0438\u0444\u0440 (\u0441\u043c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435), \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043b\u044f x, y, value, \u0438 \u043c\u043e\u0433\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043b\u0435 z, \u043f\u0440\u0438\u0447\u0435\u043c value \u2014 \u043d\u0435\u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0430 x, y, z \u0432\u0441\u0435 \u0438\u043c\u0435\u044e\u0442 \u043d\u0435\u043a\u0438\u0439 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0442\u0438\u043f point_coord, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0447\u0438\u0441\u043b\u0443 \u043e\u0442 -1 \u0434\u043e +1. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 JSON Schema \u043d\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 (\u0447\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u0438\u0441\u0442\u0438\u043d\u044b), \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0445\u0432\u0430\u0442\u0438\u0442\u044c \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u041d\u043e \u044d\u0442\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u044f\u0437\u044b\u043a\u0430\/\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 XML \u0442\u0430\u043a\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u0440\u044f\u0434 \u043b\u0438 \u043c\u043e\u0433 \u0431\u044b \u0432\u0441\u0442\u0430\u0442\u044c.<\/p>\n<p>  \u041d\u0430 <a href=\"http:\/\/json-schema.org\/\">http:\/\/json-schema.org\/<\/a> \u0441\u0430\u0439\u0442\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 <a href=\"http:\/\/json-schema.org\/implementations.html\">\u0441\u043f\u0438\u0441\u043e\u043a \u041f\u041e<\/a> \u0434\u043b\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438. \u0418 \u0432\u043e\u0442 \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043d\u0435\u0437\u0440\u0435\u043b\u043e\u0441\u0442\u044c JSON-Schema (\u0438 \u0435\u0435 \u0441\u0430\u0439\u0442\u0430) \u0434\u0430\u0435\u0442 \u043e \u0441\u0435\u0431\u0435 \u0437\u043d\u0430\u0442\u044c. \u0414\u043b\u044f C++ \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u043e\u0434\u043d\u0430 (\u0432\u0440\u043e\u0434\u0435 \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f) \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/bitbucket.org\/gallen\/libvariant\">libvariant<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0435\u0439 \u043b\u0438\u0448\u044c \u043f\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0443 \u0438 \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0432\u044b\u043f\u0443\u0449\u0435\u043d\u0430 \u043f\u043e\u0434 \u0437\u043b\u043e\u0432\u0440\u0435\u0434\u043d\u043e\u0439 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 LGPL (\u043f\u0440\u043e\u0449\u0430\u0439, iOS). \u0414\u043b\u044f C \u0443 \u043d\u0430\u0441 \u0442\u043e\u0436\u0435 <a href=\"https:\/\/github.com\/netmail-open\/wjelement\">\u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442<\/a>, \u0438 \u0442\u043e\u0436\u0435 \u043f\u043e\u0434 LGPL.<\/p>\n<p>  \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043f\u0440\u0438\u0435\u043c\u043b\u0435\u043c\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/github.com\/tristanpenman\/valijson\">valijson<\/a>. \u0423 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e (\u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0441\u0445\u0435\u043c \u0438 BSD-\u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044f), \u0438 \u0434\u0430\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u2014 \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 JSON-\u043f\u0430\u0440\u0441\u0435\u0440\u0430. Valijson \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 json-\u043f\u0430\u0440\u0441\u0435\u0440 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430 (\u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u044b \u0434\u043b\u044f jsoncpp, json11, rapidjson, picojson \u0438 boost::property_tree), \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u043d\u043e\u0432\u0443\u044e json-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 (\u0438\u043b\u0438 \u0442\u0430\u0449\u0438\u0442\u044c \u0437\u0430 \u0441\u043e\u0431\u043e\u0439 \u0435\u0449\u0435 \u043e\u0434\u043d\u0443). \u041f\u043b\u044e\u0441 \u043a\u043e \u0432\u0441\u0435\u043c\u0443, \u043e\u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 (header only) \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d, \u0438 \u0442\u043e \u043d\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445, \u2014 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 boost. \u0425\u043e\u0442\u044f <a href=\"https:\/\/github.com\/tristanpenman\/valijson\/issues\/15\">\u0435\u0441\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u0434\u0430<\/a> \u043d\u0430 \u0438\u0437\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0436\u0435 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u0434\u043e-\u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0430.<\/p>\n<p>  \u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 JSON-\u0441\u0445\u0435\u043c\u044b \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<h5>\u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0445\u0435\u043c\u044b<\/h5>\n<p>  \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043d\u0435\u043a\u0438\u0445 \u043f\u043e\u043b\u043e\u0441\u0430\u0442\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0437\u0430\u0434\u0430\u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u043f\u043e\u043b\u043e\u0441\u0430\u0442\u0430\u044f \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0430 (\u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 0 \u0438 1, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0447\u0435\u0440\u043d\u043e\u043c\u0443 \u0438 \u0431\u0435\u043b\u043e\u043c\u0443).<\/p>\n<pre><code>{     &quot;0inv&quot;: {         &quot;width&quot;: 0.11,         &quot;stripe_length&quot;: 0.15,         &quot;code&quot;: &quot;101101101110&quot;     },     &quot;0&quot;: {         &quot;width&quot;: 0.05,         &quot;stripe_length&quot;: 0.11,         &quot;code&quot;: &quot;010010010001&quot;     },     &quot;3&quot;: {         &quot;width&quot;: 0.05,         &quot;stripe_length&quot;: 0.11,         &quot;code&quot;: &quot;010010110001&quot;     },     ... } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u043c\u0438 \u043a\u043b\u044e\u0447\u0430\u043c\u0438, \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043f\u0438\u0441\u0430\u043d \u0441\u0443\u0444\u0444\u0438\u043a\u0441 \u00abinv\u00bb (\u0434\u043b\u044f \u0438\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0448\u0442\u0440\u0438\u0445-\u043a\u043e\u0434\u043e\u0432). \u0412\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438 \u0438 \u043e\u0431\u044f\u0437\u0430\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u043f\u043e\u043b\u044f \u00abwidth\u00bb, \u00abstripe_length\u00bb (\u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430) \u0438 \u00abcode\u00bb (\u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0443\u043b\u0435\u0439 \u0438 \u0435\u0434\u0438\u043d\u0438\u0446 \u0434\u043b\u0438\u043d\u044b 12).<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0445\u0435\u043c\u0443, \u0443\u043a\u0430\u0437\u0430\u0432 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0444\u043e\u0440\u043c\u0430\u0442 \u0438\u043c\u0435\u043d \u043f\u043e\u043b\u0435\u0439 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f:<\/p>\n<pre><code>{     &quot;comment&quot;: &quot;Schema for the striped object specification file&quot;,     &quot;type&quot;: &quot;object&quot;,     &quot;patternProperties&quot;: {         &quot;^[0-9]+(inv)?$&quot;: { }     },     &quot;additionalProperties&quot;: false } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u043c patternProperties, \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u044e\u0449\u0438\u043c\/\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u044e\u0449\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043a\u043b\u044e\u0447\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 (additionalProperties=false), \u0447\u0442\u043e \u043d\u0435\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043b\u044e\u0447\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f additionalProperties, \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u0435\u0442\u0438\u0442\u044c \u043d\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u044f\u0432\u043d\u043e \u043f\u043e\u043b\u044f, \u043d\u043e \u0438 \u043d\u0430\u043b\u043e\u0436\u0438\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0443\u043a\u0430\u0437\u0430\u0432 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0442\u0438\u043f\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<pre><code>{     &quot;additionalProperties&quot;: {         &quot;type&quot;: &quot;string&quot;,         &quot;pattern&quot;: &quot;^Comment: .*$&quot;     } } <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043e\u043f\u0438\u0448\u0435\u043c \u0442\u0438\u043f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u0435:<\/p>\n<pre><code>{     &quot;type&quot;: &quot;object&quot;,     &quot;properties&quot;: {         &quot;width&quot;: {             &quot;type&quot;: &quot;number&quot;,             &quot;minimum&quot;: 0,             &quot;exclusiveMinimum&quot;: true         },         &quot;stripe_length&quot;: {             &quot;type&quot;: &quot;number&quot;,             &quot;minimum&quot;: 0,             &quot;exclusiveMinimum&quot;: true         },         &quot;code&quot;: {             &quot;type&quot;: &quot;string&quot;,             &quot;pattern&quot;: &quot;^[01]{12}$&quot;         }     },     &quot;required&quot;: [&quot;width&quot;, &quot;stripe_length&quot;, &quot;code&quot;] } <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u044f\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f (properties), \u0442\u0440\u0435\u0431\u0443\u044f \u0438\u0445 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 (required), \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u044f (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e) \u043b\u044e\u0431\u044b\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430. \u0427\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0443 \u043d\u0430\u0441 \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435, \u0430 \u0441\u0442\u0440\u043e\u043a\u0430 code \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u043c\u0443 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044e.<\/p>\n<p>  \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041d\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u00abwidth\u00bb \u0438 \u00abstripe_length\u00bb. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u0434\u0435, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0437\u044f\u0442 \u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f, \u0430 \u043f\u043e\u0442\u043e\u043c\u044b \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u0433\u043e \u043e\u0442\u043e\u0441\u0432\u044e\u0434\u0443. \u0418\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0441\u0441\u044b\u043b\u043e\u043a ($ref). \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u043a\u0446\u0438\u044e definitions \u0432 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u0441\u0445\u0435\u043c\u0435:<\/p>\n<pre><code>{     &quot;comment&quot;: &quot;Schema for the striped object specification file&quot;,     &quot;type&quot;: &quot;object&quot;,     &quot;patternProperties&quot;: {         &quot;^[0-9]+(inv)?$&quot;: {             &quot;type&quot;: &quot;object&quot;,             &quot;properties&quot;: {                 &quot;width&quot;: { &quot;$ref&quot;: &quot;#\/definitions\/positive_number&quot; },                 &quot;stripe_length&quot;: { &quot;$ref&quot;: &quot;#\/definitions\/positive_number&quot; },                 &quot;code&quot;: {                     &quot;type&quot;: &quot;string&quot;,                     &quot;pattern&quot;: &quot;^[01]{12}$&quot;                 }             },             &quot;required&quot;: [&quot;width&quot;, &quot;stripe_length&quot;, &quot;code&quot;]         }     },     &quot;additionalProperties&quot;: false,     &quot;definitions&quot;: {         &quot;positive_number&quot;: {             &quot;type&quot;: &quot;number&quot;,             &quot;minimum&quot;: 0,             &quot;exclusiveMinimum&quot;: true         }     } } <\/code><\/pre>\n<p>  \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u043c \u0435\u0435 \u0432 \u0444\u0430\u0439\u043b \u0438 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u0430.<\/p>\n<h5>\u041f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 valijson<\/h5>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 json-\u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/github.com\/open-source-parsers\/jsoncpp\">jsoncpp<\/a>. \u0418\u043c\u0435\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 json-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430:<\/p>\n<pre><code class=\"cpp\">#include &lt;json-cpp\/json.h&gt;  Json::Value load_document(std::string const&amp; filename) {   Json::Value root;   Json::Reader reader;   std::ifstream ifs(filename, std::ifstream::binary);   if (!reader.parse(ifs, root, false))     throw std::runtime_error(&quot;Unable to parse &quot; + filename + &quot;: &quot;                              + reader.getFormatedErrorMessages());   return root; } <\/code><\/pre>\n<p>  \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440, \u0441\u043e\u043e\u0431\u0449\u0430\u044e\u0449\u0430\u044f \u043d\u0430\u043c \u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0432\u0441\u0435\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438, \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code>#include &lt;valijson\/adapters\/jsoncpp_adapter.hpp&gt; #include &lt;valijson\/schema.hpp&gt; #include &lt;valijson\/schema_parser.hpp&gt; #include &lt;valijson\/validation_results.hpp&gt; #include &lt;valijson\/validator.hpp&gt;  void validate_json(Json::Value const&amp; root, Json::Value const&amp; schema_js) {   using valijson::Schema;   using valijson::SchemaParser;   using valijson::Validator;   using valijson::ValidationResults;   using valijson::adapters::JsonCppAdapter;    JsonCppAdapter doc(root);   JsonCppAdapter schema_doc(schema_js);    SchemaParser parser(SchemaParser::kDraft4);   Schema schema;   parser.populateSchema(schema_doc, schema);   Validator validator(schema);   validator.setStrict(false);   ValidationResults results;   if (!validator.validate(doc, &amp;results))   {     std::stringstream err_oss;     err_oss &lt;&lt; &quot;Validation failed.&quot; &lt;&lt; std::endl;     ValidationResults::Error error;     int error_num = 1;     while (results.popError(error))     {       std::string context;       std::vector&lt;std::string&gt;::iterator itr = error.context.begin();       for (; itr != error.context.end(); itr++)         context += *itr;        err_oss &lt;&lt; &quot;Error #&quot; &lt;&lt; error_num &lt;&lt; std::endl               &lt;&lt; &quot;  context: &quot; &lt;&lt; context &lt;&lt; std::endl               &lt;&lt; &quot;  desc:    &quot; &lt;&lt; error.description &lt;&lt; std::endl;       ++error_num;     }     throw std::runtime_error(err_oss.str());   } } <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 jsoncpp \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a <code>#include &lt;json-cpp\/json.h&gt;<\/code>, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a <code>valijson\/adapters\/jsoncpp_adapter.hpp<\/code> \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 valijson \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e jsoncpp \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a <code>#include &lt;json\/json.h&gt;<\/code>. \u0422\u0430\u043a \u0447\u0442\u043e \u043d\u0435 \u0443\u0434\u0438\u0432\u043b\u044f\u0439\u0442\u0435\u0441\u044c, \u0435\u0441\u043b\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u0442 <code>json\/json.h<\/code>, \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043f\u0440\u0430\u0432\u044c\u0442\u0435 <code>valijson\/adapters\/jsoncpp_adapter.hpp<\/code>.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b:<\/p>\n<pre><code class=\"cpp\">Json::Value const doc = load_document(&quot;\/path\/to\/document.json&quot;); Json::Value const schema = load_document(&quot;\/path\/to\/schema.json&quot;); try {     validate_json(doc, schema);     ...     return 0; } catch (std::exception const&amp; e) {     std::cerr &lt;&lt; &quot;Exception: &quot; &lt;&lt; e.what() &lt;&lt; std::endl;     return 1; } <\/code><\/pre>\n<p>  \u0412\u0441\u0435, \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c json-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b. \u041d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0434\u0443\u043c\u0430\u0442\u044c, \u0433\u0434\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0445\u0435\u043c\u044b! \u0412\u0435\u0434\u044c \u0435\u0441\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 web-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u043b\u0438 \u0438\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u0442\u043e \u0441\u0445\u0435\u043c\u0430 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u0430 \u0438 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0410 \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0431\u0435\u0437 \u0440\u0430\u0437\u0432\u0438\u0442\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0440\u044c\u0435\u0440 \u0434\u043b\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0432\u0430\u043b\u0438\u0434\u0430\u0447\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u0445\u0435\u043c\u044b. \u0412\u043e\u0442 \u0431\u044b\u043b\u043e \u0431\u044b \u0437\u0434\u043e\u0440\u043e\u0432\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439, \u0432\u0435\u0434\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0441\u0445\u0435\u043c\u044b \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442.<\/p>\n<p>  \u042d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u0434\u0430\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0438 \u0435\u0441\u0442\u044c C++11. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u043e\u0435, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e: \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0441\u0445\u0435\u043c\u043e\u0439. \u0410 \u0447\u0442\u043e\u0431 \u043d\u0435 \u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u043e \u043a\u0430\u0432\u044b\u0447\u043a\u0430\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0442\u0440\u043e\u043a\u0438, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"http:\/\/en.cppreference.com\/w\/cpp\/language\/string_literal\">raw string literal<\/a>:<\/p>\n<pre><code class=\"cpp\">\/\/ \u0421\u0445\u0435\u043c\u0430 \u043a\u0430\u043a R&quot;(raw string)&quot; static std::string const MY_SCHEMA = R&quot;({     &quot;comment&quot;: &quot;Schema for pole json specification&quot;,     &quot;type&quot;: &quot;object&quot;,     &quot;patternProperties&quot;: {         &quot;^[0-9]+(inv)?$&quot;: {             ...             ...         }     }     ... })&quot;;  \/\/ \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 json \u0438\u0437 \u0441\u0442\u0440\u043e\u043a\u0438 Json::Value json_from_string(std::string const&amp; str); {   Json::Reader reader;   std::stringstream schema_stream(str);   Json::Value doc;   if (!reader.parse(schema_stream, doc, false))     throw std::runtime_error(&quot;Unable to parse the embedded schema: &quot;                              + reader.getFormatedErrorMessages());   return doc; }  \/\/ \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 doc (validate_json \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u0432\u044b\u0448\u0435) validate_json(doc, json_from_string(MY_SCHEMA)); <\/code><\/pre>\n<p>  \u0422.\u043e. \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u044b\u0439 \u043a\u0440\u043e\u0441\u0441-\u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 json-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432 C++ \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u044f\u043c\u0438, \u043d\u0438 \u0432\u043e\u0437\u043d\u0438 \u0441 \u043f\u0443\u0442\u044f\u043c\u0438 \u043a \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c. \u042d\u0442\u0430 \u0432\u0435\u0449\u044c \u043c\u043e\u0436\u0435\u0442 \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u0438\u043b, \u0438, \u0447\u0442\u043e \u043d\u0435\u043c\u0430\u043b\u043e\u0432\u0430\u0436\u043d\u043e, \u043f\u043e\u043c\u043e\u0447\u044c \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0438\u0442\u044c XML \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0438\u0431\u043e \u043e\u043d \u043d\u0435\u0443\u0434\u043e\u0431\u0435\u043d \u043d\u0438 \u0434\u043b\u044f \u043b\u044e\u0434\u0435\u0439, \u043d\u0438 \u0434\u043b\u044f \u043c\u0430\u0448\u0438\u043d.       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/276305\/\"> https:\/\/habrahabr.ru\/post\/276305\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 JSON Schema \u0438 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0444\u043e\u0440\u043c\u0430\u0442\u0443 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C++ \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/tristanpenman\/valijson\">valijson<\/a>.<\/p>\n<h5>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0441\u0442\u043e\u0440\u0438\u0438<\/h5>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u043b\u043e \u043a \u043f\u043e\u0432\u0441\u0435\u043c\u0435\u0441\u0442\u043d\u043e\u043c\u0443 \u0432\u044b\u0442\u0435\u0441\u043d\u0435\u043d\u0438\u044e JSON-\u043e\u043c XML-\u0430 \u0438 \u0447\u0442\u043e \u0432 \u044d\u0442\u043e\u043c \u0431\u044b\u043b\u043e \u043f\u043b\u043e\u0445\u043e\u0433\u043e. XML \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a <em>\u043c\u0435\u0442\u0430\u044f\u0437\u044b\u043a<\/em> <em>\u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438<\/em> \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u043d\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0411\u0443\u0434\u0443\u0447\u0438 \u043f\u0435\u0440\u0432\u044b\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430, \u0434\u0430 \u0435\u0449\u0435 \u0438 \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u043c\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0438\u043e\u0434 \u0431\u0443\u0440\u043d\u043e\u0433\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c, XML \u043f\u043e\u0441\u043b\u0443\u0436\u0438\u043b \u043e\u0441\u043d\u043e\u0432\u043e\u0439 \u0434\u043b\u044f \u0431\u0435\u0441\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u0432 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f, \u0442.\u0435. \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0422\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u0441\u044f \u043e\u043d \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-273314","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273314","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=273314"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/273314\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=273314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=273314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=273314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}