{"id":158927,"date":"2012-11-16T16:53:02","date_gmt":"2012-11-16T12:53:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=158927"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=158927","title":{"rendered":"<span class=\"post_title\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u044b\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445. JSON-Schema<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" align=\"left\" src=\"http:\/\/habrastorage.org\/storage2\/f5f\/a8b\/6b7\/f5fa8b6b7b724611f65fb97ea5fae8d0.png\"\/><br \/>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u044b) \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0438\u043c\u0435\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 JSON-PRC, JSON-REST, PHP-GET\/POST. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u043d\u0430\u0433\u0440\u043e\u043c\u043e\u0436\u0434\u0435\u043d\u0438\u044f if-\u043e\u0432 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0441\u043e \u0441\u0445\u0435\u043c\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f JSON-Schema, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0433\u043e \u043f\u043e\u0431\u043b\u0438\u0436\u0435.<br \/>  <a name=\"habracut\"><\/a><br \/>  <a href=\"http:\/\/json-schema.org\/\">JSON-schema<\/a> \u2014 \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/JSON\">JSON<\/a>, \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0431\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 <a href=\"http:\/\/www.w3.org\/TR\/xmlschema-0\/\">XML-Schema<\/a>, \u0434\u0440\u0430\u0444\u0442 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 <a href=\"https:\/\/github.com\/json-schema\/project-info\/blob\/master\/README.md\">\u0437\u0434\u0435\u0441\u044c<\/a> (\u0434\u0430\u043b\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 03). \u0421\u0445\u0435\u043c\u044b, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u044d\u0442\u0438\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c, \u0438\u043c\u0435\u044e\u0442 MIME \u00abapplication\/schema+json\u00bb. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0445 \u0438\u0437 \u0447\u0438\u0441\u0435\u043b, \u0441\u0442\u0440\u043e\u043a, \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0442\u0438\u043f\u0430 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f: \u043e\u0431\u044a\u0435\u043a\u0442, \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0445\u044d\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u0430, \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u043b\u0438 \u043a\u0430\u0440\u0442\u0430, \u0434\u0430\u043b\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u00ab\u043e\u0431\u044a\u0435\u043a\u0442\u00bb \u0438\u043b\u0438 \u00abobject\u00bb). \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u044b\u0435 \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0435 <a href=\"http:\/\/json-schema.org\/implementations.html\">\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/a> \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c \u0438 \u044f\u0437\u044b\u043a\u043e\u0432, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 javascript, php, ruby, python, java.<\/p>\n<h4>\u0421\u0445\u0435\u043c\u0430<\/h4>\n<p>  \u0421\u0445\u0435\u043c\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f JSON-\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u043c \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 JSON. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u044d\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438, \u043a\u0430\u0436\u0434\u043e\u0435 \u0438\u0445 \u043d\u0438\u0445 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 (\u0434\u0430\u043b\u0435\u0435 \u2014 \u043f\u0440\u0430\u0432\u0438\u043b\u043e). \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e, \u0441\u0445\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445 (\u043f\u0440\u0430\u0432\u0438\u043b\u043e type \u0438\u043b\u0438 disallow, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0442\u0430\u043a \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c):  <\/p>\n<ul>\n<li>string (\u0441\u0442\u0440\u043e\u043a\u0430)<\/li>\n<li>number (\u0447\u0438\u0441\u043b\u043e, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u0441\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430)<\/li>\n<li>integer (\u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c number)<\/li>\n<li>boolean (true \u0438\u043b\u0438 false)<\/li>\n<li>object (\u043e\u0431\u044a\u0435\u043a\u0442, \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445 \u0437\u043e\u0432\u0451\u0442\u0441\u044f \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c, \u0445\u044d\u0448\u0435\u043c, \u0445\u044d\u0448-\u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439, \u043a\u0430\u0440\u0442\u043e\u0439 \u0438\u043b\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0451\u043c)<\/li>\n<li>array (\u043c\u0430\u0441\u0441\u0438\u0432)<\/li>\n<li>null (\u00ab\u043d\u0438\u0447\u0435\u0433\u043e\u00bb, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 null)<\/li>\n<li>any (\u043b\u044e\u0431\u043e\u0439 \u0442\u0438\u043f, \u0432\u043a\u043b\u044e\u0447\u0430\u044f null)<\/li>\n<\/ul>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0447\u0438\u0441\u043b\u043e\u043c, \u043a \u043d\u0435\u043c\u0443 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b minimum, maximum, divisibleBy. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c, \u0432 \u0441\u0438\u043b\u0443 \u0432\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430: minItems, maxItems, uniqueItems, items. \u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0441\u044f: pattern, minLength, maxLength. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442, \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u0430: properties, patternProperties, additionalProperties.<\/p>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f \u0442\u0438\u043f\u0430 \u043f\u0440\u0430\u0432\u0438\u043b, \u0435\u0441\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u043e\u0431\u0449\u0451\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a required \u0438 format, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a id, title, description, $schema. \u0421\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a: date-time (ISO 8601), date, time, utc-millisec, regex, color (W3C.CR-CSS21-20070719), style (W3C.CR-CSS21-20070719), phone, uri, email, ip-address (V4), ipv6, host-name, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439. \u0411\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0441 \u044d\u0442\u0438\u043c\u0438 \u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0432 <a href=\"http:\/\/tools.ietf.org\/id\/draft-zyp-json-schema-03.txt\">\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0441\u0445\u0435\u043c\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f JSON-\u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c, \u043e\u043d\u0430 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0441\u0445\u0435\u043c\u043e\u0439. \u0421\u0445\u0435\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0435\u043a\u0443\u0449\u0430\u044f \u0441\u0445\u0435\u043c\u0430, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0435 $schema. \u041f\u043e \u043d\u0435\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u0440\u0430\u0444\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0445\u0435\u043c\u044b. \u041d\u0430\u0439\u0442\u0438 \u044d\u0442\u0438 \u0441\u0445\u0435\u043c\u044b \u043c\u043e\u0436\u043d\u043e <a href=\"http:\/\/json-schema.org\/\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<p>  \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043c\u043e\u0449\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 JSON-Schema \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u0437 \u0441\u0445\u0435\u043c\u044b \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u0445\u0435\u043c\u044b, \u0430 \u0442\u0430\u043a \u0436\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c (\u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c) \u0441\u0445\u0435\u043c\u044b (\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u0441\u044b\u043b\u043e\u043a <a href=\"http:\/\/tools.ietf.org\/html\/draft-pbryan-zyp-json-ref-02\">JSON-Ref<\/a>). \u0414\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e id, extends \u0438 $ref. \u041f\u0440\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0438 \u0441\u0445\u0435\u043c\u044b \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0438\u0445. \u041f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u0430 \u043a \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0437 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0439 \u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0435\u0439 \u0441\u0445\u0435\u043c\u044b. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0430\u043b\u0435\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/h4>\n<p>  \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0435\u0441\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u043e\u0432\u0430\u0440\u0430\u0445. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0430 \u0435\u0441\u0442\u044c \u0438\u043c\u044f. \u042d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430 \u043e\u0442 3 \u0434\u043e 50 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u0431\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u043d\u0430 \u043a\u043e\u043d\u0446\u0430\u0445. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0445\u0435\u043c\u0443 \u0434\u043b\u044f \u0438\u043c\u0435\u043d\u0438 \u0442\u043e\u0432\u0430\u0440\u0430:  <\/p>\n<pre><code class=\"javascript\">    {         &quot;$schema&quot;: &quot;http:\/\/json-schema.org\/draft-03\/schema#&quot;, \/\/ \u0438\u0434 \u0441\u0445\u0435\u043c\u044b \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0445\u0435\u043c\u044b         &quot;id&quot;: &quot;urn:product_name#&quot;,         &quot;type&quot;: &quot;string&quot;,         &quot;pattern&quot;: &quot;^\\\\S.*\\\\S$&quot;,         &quot;minLength&quot;: 3,         &quot;maxLength&quot;: 50,     } <\/code><\/pre>\n<p>  \u041e\u0442\u043b\u0438\u0447\u043d\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0438\u043c\u0435\u043d\u0438 \u0442\u043e\u0432\u0430\u0440\u0430. \u0414\u0430\u043b\u0435\u0435, \u0443 \u0442\u043e\u0432\u0430\u0440\u0430 \u0435\u0441\u0442\u044c \u043d\u0435\u043e\u0442\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0446\u0435\u043d\u0430, \u0442\u0438\u043f (&#8216;phone&#8217; \u0438\u043b\u0438 &#8216;notebook&#8217;), \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 wi-fi n \u0438 g. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0445\u0435\u043c\u0443 \u0434\u043b\u044f \u0442\u043e\u0432\u0430\u0440\u0430:  <\/p>\n<pre><code class=\"javascript\">    {         &quot;$schema&quot;:&quot;http:\/\/json-schema.org\/draft-03\/schema#&quot;,         &quot;id&quot;: &quot;urn:product#&quot;,         &quot;type&quot;: &quot;object&quot;,         &quot;additionalProperties&quot;: false,         &quot;properties&quot;: {             &quot;name&quot;: {                 &quot;extends&quot;: {&quot;$ref&quot;: &quot;urn:product_name#&quot;},                 &quot;required&quot;: true             },             &quot;price&quot;: {                 &quot;type&quot;: &quot;integer&quot;,                 &quot;min&quot;: 0,                 &quot;required&quot;: true             },             &quot;type&quot;: {                 &quot;type&quot;: &quot;string&quot;,                 &quot;enum&quot;: [&quot;phone&quot;, &quot;notebook&quot;],                 &quot;required&quot;: true             },             &quot;wi_fi&quot;: {                 &quot;type&quot;: &quot;array&quot;,                 &quot;items&quot;: {                     &quot;type&quot;: &quot;string&quot;,                     &quot;enum&quot;: [&quot;n&quot;, &quot;g&quot;]                 },                 &quot;uniqueItems&quot;: true             }         }     } <\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0441\u0445\u0435\u043c\u0443 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0435\u0451 \u043f\u0440\u0430\u0432\u0438\u043b\u043e\u043c required. \u042d\u0442\u043e\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0445\u0435\u043c\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0433\u0434\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u043c\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0430 \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f.<\/p>\n<h4>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h4>\n<p>  \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 JSON-Schema, \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0440\u0430\u0437\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u0430 \u0438 \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u0440\u0430\u0432\u0438\u043b. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0435\u0441\u0442 \u043d\u0430 <a href=\"http:\/\/nodejs.org\/\">nodejs<\/a> \u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u00ab\u043f\u043e\u043b\u043d\u043e\u0433\u043e\u00bb \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u0430 <a href=\"https:\/\/github.com\/garycourt\/JSV\">JSV<\/a> (\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u00abnpm install JSV\u00bb). \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0442\u044b\u0441\u044f\u0447\u0443 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0441 \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u043c\u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c\u0438, \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0433\u043e\u043d\u0438\u043c \u0438\u0445 \u0447\u0435\u0440\u0435\u0437 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0448\u0438\u0431\u043e\u043a \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0442\u0435\u0441\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">var jsv = require('JSV').JSV.createEnvironment();  console.time('load schemas');  jsv.createSchema(     {         &quot;$schema&quot;: &quot;http:\/\/json-schema.org\/draft-03\/schema#&quot;,         &quot;id&quot;: &quot;urn:product_name#&quot;,         &quot;type&quot;: &quot;string&quot;,         &quot;pattern&quot;: &quot;^\\\\S.*\\\\S$&quot;,         &quot;minLength&quot;: 3,         &quot;maxLength&quot;: 50,     } );  jsv.createSchema(     {         &quot;$schema&quot;:&quot;http:\/\/json-schema.org\/draft-03\/schema#&quot;,         &quot;id&quot;: &quot;urn:product#&quot;,         &quot;type&quot;: &quot;object&quot;,         &quot;additionalProperties&quot;: false,         &quot;properties&quot;: {             &quot;name&quot;: {                 &quot;extends&quot;: {&quot;$ref&quot;: &quot;urn:product_name#&quot;},                 &quot;required&quot;: true             },             &quot;price&quot;: {                 &quot;type&quot;: &quot;integer&quot;,                 &quot;min&quot;: 0,                 &quot;required&quot;: true             },             &quot;type&quot;: {                 &quot;type&quot;: &quot;string&quot;,                 &quot;enum&quot;: [&quot;phone&quot;, &quot;notebook&quot;],                 &quot;required&quot;: true             },             &quot;wi_fi&quot;: {                 &quot;type&quot;: &quot;array&quot;,                 &quot;items&quot;: {                     &quot;type&quot;: &quot;string&quot;,                     &quot;enum&quot;: [&quot;n&quot;, &quot;g&quot;]                 },                 &quot;uniqueItems&quot;: true             }         }     } );  console.timeEnd('load schemas'); console.time('prepare data');  var i, j; var product; var products = []; var names = []; for (i = 0; i &lt; 1000; i++) {     product = {         name: 'product ' + i     };     if (Math.random() &lt; 0.05) {         while (product.name.length &lt; 60) {             product.name += 'long';         }     }     names.push(product.name);     if (Math.random() &lt; 0.95) {         product.price = Math.floor(Math.random() * 200 - 2);     }     if (Math.random() &lt; 0.95) {         product.type = ['notebook', 'phone', 'something'][Math.floor(Math.random() * 3)];     }     if (Math.random() &lt; 0.5) {         product.wi_fi = [];         for (j = 0; j &lt; 3; j++) {             if (Math.random() &lt; 0.5) {                 product.wi_fi.push(['g', 'n', 'a'][Math.floor(Math.random() * 3)]);             }         }     }      products.push(product); }  console.timeEnd('prepare data');  var errors; var results = {}; var schema; var message;  schema = jsv.findSchema('urn:product_name#'); console.time('names validation');  for (i = 0; i &lt; names.length; i++) {     errors = schema.validate(names[i]).errors;     for (j = 0; j &lt; errors.length; j++) {         message = errors[j].message;         if (!results.hasOwnProperty(message)) {             results[message] = 0;         }         results[message]++;     } } console.timeEnd('names validation'); console.dir(results); results = {};  schema = jsv.findSchema('urn:product#'); console.time('products validation');  for (i = 0; i &lt; products.length; i++) {     errors = schema.validate(products[i]).errors;     for (j = 0; j &lt; errors.length; j++) {         message = errors[j].message;         if (!results.hasOwnProperty(message)) {             results[message] = 0;         }         results[message]++;     } } console.timeEnd('products validation'); console.dir(results); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f 1000 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432\u043f\u043e\u043b\u043d\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435. <br \/>  \u041d\u0430 \u043c\u043e\u0435\u043c \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 (MBA, OSX, 1.86 GHz Core2Duo):<br \/>  names validation: 180ms<br \/>  products validation: 743ms<\/p>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  JSON-Schema \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440\u043e\u0432 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u043e\u0449\u0435 \u0438 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u0435\u0435, \u0447\u0435\u043c XML Schema, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0451\u043c. \u041e\u043d \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u0445: \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0444\u043e\u0440\u043c POST-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, JSON REST API, \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043f\u0440\u0438 \u043e\u0431\u043c\u0435\u043d\u0435 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u043a\u0435\u0442\u044b, \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0411\u0414 \u0438 \u0442. \u0434. \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f JSON-Schema \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0438 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u041f\u041e.    \t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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=\"http:\/\/habrahabr.ru\/post\/158927\/\"> http:\/\/habrahabr.ru\/post\/158927\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" align=\"left\" src=\"http:\/\/habrastorage.org\/storage2\/f5f\/a8b\/6b7\/f5fa8b6b7b724611f65fb97ea5fae8d0.png\"\/><br \/>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u044b \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u044b) \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0434\u0440\u0435\u0432\u043e\u0432\u0438\u0434\u043d\u043e\u043c \u0432\u0438\u0434\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0438\u043c\u0435\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 JSON-PRC, JSON-REST, PHP-GET\/POST. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u043d\u0430\u0433\u0440\u043e\u043c\u043e\u0436\u0434\u0435\u043d\u0438\u044f if-\u043e\u0432 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u0445 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u043c\u0438 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e \u043f\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u043c. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u0432\u0430\u043b\u0438\u0434\u0430\u0442\u043e\u0440, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0441\u043e \u0441\u0445\u0435\u043c\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0443. \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f JSON-Schema, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0433\u043e \u043f\u043e\u0431\u043b\u0438\u0436\u0435.  <\/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-158927","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/158927","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=158927"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/158927\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=158927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=158927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=158927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}