{"id":444887,"date":"2025-01-13T15:14:21","date_gmt":"2025-01-13T15:14:21","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=444887"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=444887","title":{"rendered":"<span>\u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435: \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 JSON<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f99\/1da\/d5e\/f991dad5eefd93a941300b83f7837dab.png\" width=\"6912\" height=\"3456\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f99\/1da\/d5e\/f991dad5eefd93a941300b83f7837dab.png\"\/><\/figure>\n<p>\u041d\u0438 \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0435 \u0441\u0435\u043a\u0440\u0435\u0442, \u0447\u0442\u043e JSON \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435: \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c (\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c) \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432 NoSQL-\u0431\u0430\u0437\u0430\u0445, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, API-\u043e\u0442\u0432\u0435\u0442\u044b \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u041e\u043d \u0441\u0442\u0430\u043b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u043e\u0434\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f JavaScript \u0438 Node.js. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 JSON \u0441\u0442\u043e\u0438\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u044f\u0434 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043b\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c:<\/p>\n<ol>\n<li>\n<p>\u041d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\/\u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 JSON &#8212; \u0441 \u0444\u043e\u043a\u0443\u0441\u043e\u043c \u043d\u0430 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 JSON-\u0444\u0430\u0439\u043b\u043e\u0432 &#8212; \u043d\u044e\u0430\u043d\u0441\u044b \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432 Node.js (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b JSON: MessagePack \u0438 Protocol Buffers &#8212; \u043a\u043e\u0433\u0434\u0430 \u0438 \u043a\u0430\u043a \u0438\u0445 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445.<\/p>\n<\/li>\n<\/ol>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 JSON \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u0438 \u0445\u043e\u0442\u044f\u0442 \u0433\u043b\u0443\u0431\u0436\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0442\u0435\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<blockquote>\n<p><strong>\u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c<\/strong>, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e JSON &#8212; \u043e\u043d\u0438 \u043f\u0440\u0438\u0441\u0443\u0449\u0438 \u043b\u044e\u0431\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u043c (XML, YAML \u0438 \u0434\u0440.). \u041c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043b\u0438\u0441\u044c \u043d\u0430 JSON \u043a\u0430\u043a \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0432 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 Node.js-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043d\u043e \u0432\u0441\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u0433\u0440\u0430\u0431\u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445.  <\/p>\n<\/blockquote>\n<h3>\u041d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 JSON (\u0432\u0435\u0431-\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442)<\/h3>\n<h4>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u043f\u043e\u0442\u0435\u0440\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u0412 JavaScript (\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 Node.js) \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0440\u0430\u0432\u043d\u043e 2^53 &#8212; 1. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u0435 ID \u0438\u043b\u0438 \u0434\u0435\u043d\u0435\u0436\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 \u044d\u0442\u043e\u0442 \u043f\u043e\u0440\u043e\u0433, \u0442\u043e \u043f\u0440\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 JSON \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u043f\u043e\u0442\u0435\u0440\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"javascript\">const jsonString = '{\"order_id\": 1234567890123456789, \"price\": 1499.95}'; const data = JSON.parse(jsonString); console.log(data.order_id);  \/\/ 1234567890123456800 \u2014 \u043e\u0448\u0438\u0431\u043a\u0430, \u0445\u0432\u043e\u0441\u0442 \u0447\u0438\u0441\u043b\u0430 \"\u043e\u043a\u0440\u0443\u0433\u043b\u0438\u043b\u0441\u044f\"<\/code><\/pre>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0425\u0440\u0430\u043d\u0438\u0442\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0432 JSON \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0438: <code>{\"order_id\": \"1234567890123456789\"}<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412 Node.js (\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 10.4, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445) \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c BigInt \u0434\u043b\u044f \u0442\u043e\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439: <code>BigInt(\"1234567890123456789\")<\/code>. \u041d\u043e \u0432 JSON \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b\/\u0431\u0430\u043b\u0430\u043d\u0441\u044b \u0432 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432 \u0441\u0442\u0440\u043e\u0447\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b, \u0441\u043c. \u0440\u0430\u0437\u0434\u0435\u043b \u043f\u0440\u043e ProtoBuf).<\/p>\n<\/li>\n<\/ul>\n<h4>\u0414\u0430\u0442\u044b \u0438 \u0432\u0440\u0435\u043c\u044f<\/h4>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 JSON \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u0442\u044b\/\u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412 \u0432\u0435\u0431-\u0441\u0440\u0435\u0434\u0435 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430:<\/p>\n<ol>\n<li>\n<p>ISO 8601: <code>2025-01-04T12:34:56Z<\/code><\/p>\n<\/li>\n<li>\n<p>Unix Timestamp (\u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 \u0438\u043b\u0438 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445): <code>1672822561000<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b: <code>04\/01\/2025 12:34:56<\/code>, <code>2025.01.04 12:34:56<\/code> \u0438 \u0442.\u0434.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u0442\u0443 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>Date<\/code> \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 UTC, \u043d\u043e \u043f\u0440\u0438 \u0432\u044b\u0432\u043e\u0434\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0435\u0451 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0443 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.  <\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u044b\u0434\u0430\u0451\u0442 <code>\"2025-01-04T12:34:56Z\"<\/code>, \u0430 \u043a\u0442\u043e-\u0442\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a <code>MM\/DD\/YYYY<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0435\u0437\u0430\u0442\u044c \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438\u0437 \u0434\u0430\u0442\u044b, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438.  <\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a \u0440\u0435\u0448\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0431\u043b\u044e\u0434\u0430\u0439\u0442\u0435 \u0435\u0434\u0438\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043b\u044f \u0434\u0430\u0442, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 ISO 8601 (UTC).<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438: <a href=\"https:\/\/date-fns.org\/\" rel=\"noopener noreferrer nofollow\">date-fns<\/a>, <a href=\"https:\/\/momentjs.com\/\" rel=\"noopener noreferrer nofollow\">Moment.js<\/a> (\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0438 \u043d\u0435 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f  ), Day.js, Luxon.<\/p>\n<ul>\n<li>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 <a href=\"https:\/\/tc39.es\/proposal-temporal\/docs\/\" rel=\"noopener noreferrer nofollow\">Temporal API<\/a> (\u043f\u043e\u043a\u0430 \u0432 \u0441\u0442\u0430\u0434\u0438\u0438 \u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a\u0430), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c Date \u0432 JavaScript.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 (Node.js) \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u0442 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, PostgreSQL, MongoDB) \u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u0441\u0451 \u043a UTC.<\/p>\n<\/li>\n<\/ul>\n<h4>\u042d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, Unicode \u0438 \u044d\u043c\u043e\u0434\u0437\u0438<\/h4>\n<p>JSON-\u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u044b (<code>\\n<\/code>, <code>\\t<\/code>, <code>\\\"<\/code>, <code>\\\\<\/code>). \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u043c\u043e\u0434\u0437\u0438 \u0438\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 <code>U+FFFF<\/code>, \u0442\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043d\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0443\u0440\u0440\u043e\u0433\u0430\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>\\ud83d\\ude00<\/code> \u0434\u043b\u044f \ud83d\ude00).<\/p>\n<p>\u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u044d\u0442\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 JSON-\u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u0442\u0430\u043f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043b\u0435\u0448\u0438, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u044e \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438, \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435, \u043a \u0441\u043b\u043e\u0436\u043d\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u043c\u0443 &#171;\u043b\u0435\u0441\u0443&#187; \u0441\u043b\u0435\u0448\u0435\u0439.  <\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0432\u0435\u0440\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 Unicode \u043d\u0430 \u044d\u0442\u0430\u043f\u0430\u0445 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0438\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">const data = {   text: \"Hello\\nNewLine\",   emoji: \"\ud83d\ude00\" };  const str = JSON.stringify(data); console.log(str); \/\/ {\"text\":\"Hello\\nNewLine\",\"emoji\":\"\\ud83d\\ude00\"}  const parsed = JSON.parse(str); console.log(parsed); \/\/ { text: 'Hello\\nNewLine', emoji: '\ud83d\ude00' }<\/code><\/pre>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <code>JSON.parse<\/code>\/<code>JSON.stringify<\/code>, \u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0451\u0432 API), \u0441\u0442\u043e\u0438\u0442 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<h4>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h4>\n<p>\u0412\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f REST API, \u0447\u0430\u0441\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 JSON-\u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442, \u0430 \u043f\u043e\u0442\u043e\u043c \u0443\u0434\u0438\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u043b\u0433\u043e\u043c\u0443 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0443 \u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043c\u0443 \u0440\u0430\u0441\u0445\u043e\u0434\u0443 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<ol>\n<li>\n<p>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430: <code>JSON.parse<\/code> \u043a\u0440\u0443\u043f\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435) \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0432\u0435\u0441\u0438\u0442\u044c UI \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (Node.js): <code>JSON.stringify<\/code> \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u043e\u0436\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u0435\u043d.<\/p>\n<\/li>\n<\/ol>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 JSON\u044b:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0441\u0440\u0430\u0437\u0443. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e, lazy-load \u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433 \u0442\u0430\u043c, \u0433\u0434\u0435 \u044d\u0442\u043e \u0443\u043c\u0435\u0441\u0442\u043d\u043e (Node.js <code>stream<\/code> + JSON chunking).<\/p>\n<\/li>\n<li>\n<p>\u0421\u0436\u0438\u043c\u0430\u0439\u0442\u0435 \u043e\u0442\u0432\u0435\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>gzip<\/code> \u0438\u043b\u0438 <code>brotli<\/code> \u0432 Express \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/github.com\/expressjs\/compression\" rel=\"noopener noreferrer nofollow\">compression<\/a>).<\/p>\n<\/li>\n<\/ul>\n<h3>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 JSON-\u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 Node.js<\/h3>\n<h4>\u0421\u0442\u0440\u0438\u043c\u0438\u043d\u0433 \u0438 \u043f\u043e\u0442\u043e\u043a\u0438 (Streams API)<\/h4>\n<p>\u0412 Node.js \u043a\u0440\u0430\u0439\u043d\u0435 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 JSON-\u0444\u0430\u0439\u043b\u044b (\u0438\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445) \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e, \u0430 \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<ul>\n<li>\n<p>SAX-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u044b \u0434\u043b\u044f JSON: <a href=\"https:\/\/github.com\/uhop\/stream-json\" rel=\"noopener noreferrer nofollow\">stream-json<\/a>, <a href=\"https:\/\/github.com\/dominictarr\/JSONStream\" rel=\"noopener noreferrer nofollow\">JSONStream<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0442\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b \u2192 \u043f\u0430\u0440\u0441\u0435\u0440 \u2192 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430: \u0432\u044b \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 <code>fs.createReadStream<\/code>, \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0435 \u0432 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u0441\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044d\u043c\u0438\u0442\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e \u043c\u0435\u0440\u0435 \u0447\u0442\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>stream-json<\/code>):<\/p>\n<pre><code class=\"javascript\">const fs = require('fs'); const { parser } = require('stream-json'); const { streamValues } = require('stream-json\/streamers\/StreamValues');  const readStream = fs.createReadStream('big.json');  readStream   .pipe(parser())   .pipe(streamValues())   .on('data', (data) =&gt; {     \/\/ data.value \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043a\u0443\u0441\u043e\u043a JSON     console.log(data.value);   })   .on('end', () =&gt; {     console.log('Done processing large JSON!');   });<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, Node.js \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u0435\u0441\u044c JSON \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e \u0447\u0430\u0441\u0442\u044f\u043c.<\/p>\n<h4>NDJSON \/ JSON Lines<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0444\u043e\u0440\u043c\u0430\u0442 <a href=\"https:\/\/docs.mulesoft.com\/dataweave\/latest\/dataweave-formats-ndjson\" rel=\"noopener noreferrer nofollow\">NDJSON<\/a> (Newline-Delimited JSON). \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 &#8212; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 JSON-\u043e\u0431\u044a\u0435\u043a\u0442:<\/p>\n<pre><code class=\"json\">{\"id\":1,\"name\":\"Item1\"} {\"id\":2,\"name\":\"Item2\"} {\"id\":3,\"name\":\"Item3\"}<\/code><\/pre>\n<p>\u0427\u0438\u0442\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0440\u0438\u043c\u044b \u0432 Node.js \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"javascript\">const fs = require('fs'); const readline = require('readline');  async function processNDJSON(filePath) {   const fileStream = fs.createReadStream(filePath);   const rl = readline.createInterface({ input: fileStream });    for await (const line of rl) {     const obj = JSON.parse(line);     \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 obj     console.log(obj.name);   } }  processNDJSON('items.ndjson');<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430:<\/p>\n<ul>\n<li>\n<p>\u041d\u0435 \u043d\u0430\u0434\u043e \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0434\u0443\u0442 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043b\u043e\u0433-\u0441\u0435\u0440\u0432\u0438\u0441), \u0442\u043e NDJSON \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u043b\u0435\u0442\u0443.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u044f<\/h4>\n<p>\u0414\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043c\u0435\u0441\u0442\u0430 \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 JSON-\u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u043e HTTP \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 gzip \u0438\u043b\u0438 brotli-\u0441\u0436\u0430\u0442\u0438\u0435:<\/p>\n<pre><code class=\"javascript\">const express = require('express'); const compression = require('compression');  const app = express(); app.use(compression()); \/\/ \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0436\u0430\u0442\u0438\u0435  app.get('\/api\/data', (req, res) =&gt; {   const bigObject = generateHugeObject();   res.json(bigObject); });  app.listen(3000, () =&gt; {   console.log('Server running...'); });<\/code><\/pre>\n<p>\u041d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0432\u0435\u0442, \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c JSON. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 JSON-\u0444\u0430\u0439\u043b\u044b \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0434\u0440\u0443\u0433\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u0442\u043e\u0436\u0435 \u0443\u043c\u0435\u0435\u0442 \u0434\u0435\u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442).<\/p>\n<h3>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b JSON: MessagePack \u0438 Protocol Buffers \u0434\u043b\u044f \u0432\u0435\u0431<\/h3>\n<p><a href=\"https:\/\/msgpack.org\/\" rel=\"noopener noreferrer nofollow\">\u042d\u0442\u043e \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u043d\u0430 JSON (\u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0438\u0441\u043b\u0430), \u043d\u043e \u0432 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u041f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041c\u0435\u043d\u044c\u0448\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430 20-50% \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 JSON).<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0441\u043e\u043a\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 (\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f JavaScript\/Node.js (<a href=\"https:\/\/github.com\/mcollina\/msgpack5\" rel=\"noopener noreferrer nofollow\">msgpack5<\/a>).<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041c\u0435\u043d\u044c\u0448\u0430\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e-\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c (\u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043d\u0435 \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c).<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 (\u043d\u0443\u0436\u0435\u043d \u0434\u0435\u043a\u043e\u0434\u0435\u0440).<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 (Node.js \u0441 <a href=\"https:\/\/github.com\/mcollina\/msgpack5\" rel=\"noopener noreferrer nofollow\">msgpack5<\/a>):<\/p>\n<pre><code class=\"javascript\">const msgpack = require('msgpack5')();  const data = {   user: 'Alice',   age: 30,   scores: [10, 20, 30] };  const packed = msgpack.encode(data); console.log('Packed buffer:', packed);  const unpacked = msgpack.decode(packed); console.log('Unpacked:', unpacked);<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 MessagePack \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438 \u043e\u0431\u044a\u0451\u043c\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445.<\/p>\n<p><a href=\"https:\/\/protobuf.dev\/\" rel=\"noopener noreferrer nofollow\"><strong>Protocol Buffers (Protobuf)<\/strong> <\/a>&#8212; \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0442 Google, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 <code>.proto<\/code>-\u0444\u0430\u0439\u043b\u0435 (\u0441\u0445\u0435\u043c\u0430). \u041d\u0430 \u0431\u0430\u0437\u0435 \u044d\u0442\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0434 (\u043a\u043b\u0430\u0441\u0441\u044b) \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432.<\/p>\n<p>\u041f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0441\u043e\u043a\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (\u043f\u0430\u0440\u0441\u0438\u043d\u0433, \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445).<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0440\u043e\u0433\u0430\u044f \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043d\u0430 gRPC.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c <code>.proto<\/code>-\u0441\u0445\u0435\u043c\u0443 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u043d\u044c\u0448\u0430\u044f \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 JSON (\u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u00ab\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435\u00bb \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b).<\/p>\n<\/li>\n<\/ul>\n<p>\u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0421\u0445\u0435\u043c\u0430 (<code>user.proto<\/code>):<\/p>\n<pre><code class=\"typescript\">syntax = \"proto3\";  message User {   string name = 1;   int32 age = 2;   repeated int32 scores = 3; }<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c protoc \u0438 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f Node.js, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c JS-\u043a\u043e\u0434. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0432\u0438\u0434\u0430 <code>user_pb.js<\/code>.<\/p>\n<pre><code class=\"javascript\">const messages = require('.\/user_pb'); \/\/ \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434  const user = new messages.User(); user.setName('Alice'); user.setAge(30); user.setScoresList([10, 20, 30]);  const bytes = user.serializeBinary(); console.log('Binary length:', bytes.length);  const user2 = messages.User.deserializeBinary(bytes); console.log(user2.getName(), user2.getAge(), user2.getScoresList()); <\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c Protobuf \u0432 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u0442\u0440\u043e\u0438\u0442\u0435 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043d\u0430 gRPC \u0438\u043b\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u0431\u043e\u0442\u0438\u0442\u0435\u0441\u044c \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u0438\u043b\u043e\u0431\u0430\u0439\u0442\u0435 \u0438 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0432\u0435\u0431-API, \u0433\u0434\u0435 \u0443\u0434\u043e\u0431\u043d\u0435\u0435 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432 \u0441\u044b\u0440\u043e\u043c \u0432\u0438\u0434\u0435, JSON \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432<\/h3>\n<ul>\n<li>\n<p><strong>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0447\u0438\u0441\u0435\u043b<\/strong> &#8212; \u043d\u0435 \u043f\u043e\u043b\u0430\u0433\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0435 <code>order_id<\/code> \u0438\u043b\u0438 <code>balance<\/code> \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043c\u0435\u0441\u0442\u044f\u0442\u0441\u044f \u0432 Number.<\/p>\n<\/li>\n<li>\n<p><strong>\u0425\u0440\u0430\u043d\u0438\u0442\u0435 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0434\u0430\u0442\u044b \u0432 \u0435\u0434\u0438\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435<\/strong> (ISO 8601 \u0441 UTC) &#8212; \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u044b \u0441 \u0447\u0430\u0441\u043e\u0432\u044b\u043c\u0438 \u043f\u043e\u044f\u0441\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u0440\u0438\u043c\u044c\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 JSON<\/strong> &#8212; Node.js \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0438 \u043f\u043e\u0442\u043e\u043a\u0438, \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044f \u0432\u0441\u0451 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<\/li>\n<li>\n<p><strong>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u044e<\/strong> (<code>gzip<\/code>, <code>brotli<\/code>) &#8212; \u044d\u0442\u043e \u0443\u0441\u043a\u043e\u0440\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 JSON \u0447\u0435\u0440\u0435\u0437 HTTP.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b<\/strong> (MessagePack, Protobuf), \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u043e\u0431\u044a\u0451\u043c\u0443 \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0438 \u0432\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u0434\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441\u044b).<\/p>\n<\/li>\n<\/ul>\n<h4>\u0412\u043c\u0435\u0441\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0441\u043b\u043e\u0432\u0438\u044f<\/h4>\n<p>\u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0432\u0435\u0431-\u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 JSON \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043e \u0435\u0433\u043e \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u044f\u0445: \u043f\u043e\u0442\u0435\u0440\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0447\u0438\u0441\u0435\u043b, \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0434\u0430\u0442\u044b, \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043e\u0431\u044a\u0451\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0443\u0431\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u044a\u0435\u0441\u0442\u044c \u0432\u0441\u044e \u043f\u0430\u043c\u044f\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043a \u0431\u043e\u043b\u0435\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u043c, \u0432\u0440\u043e\u0434\u0435 MessagePack \u0438\u043b\u0438 ProtoBuf. \u041d\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 JSON \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Node.js (\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u043e\u043c\/\u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0435\u0439) \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0434\u0451\u0436\u043d\u044b\u043c \u0432\u044b\u0431\u043e\u0440\u043e\u043c.<\/p>\n<p>\u0423\u0434\u0430\u0447\u043d\u043e\u0439 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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:\/\/habr.com\/ru\/articles\/871616\/\"> https:\/\/habr.com\/ru\/articles\/871616\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u041d\u0438 \u0434\u043b\u044f \u043a\u043e\u0433\u043e \u043d\u0435 \u0441\u0435\u043a\u0440\u0435\u0442, \u0447\u0442\u043e JSON \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435: \u043e\u0431\u043c\u0435\u043d \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c (\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c) \u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0432 NoSQL-\u0431\u0430\u0437\u0430\u0445, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, API-\u043e\u0442\u0432\u0435\u0442\u044b \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u041e\u043d \u0441\u0442\u0430\u043b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u043e\u0434\u043d\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f JavaScript \u0438 Node.js. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 JSON \u0441\u0442\u043e\u0438\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u044f\u0434 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439 \u0438 \u043f\u043e\u0434\u0432\u043e\u0434\u043d\u044b\u0445 \u043a\u0430\u043c\u043d\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u043b\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0435\u0440\u044c\u0451\u0437\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e, \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c:<\/p>\n<ol>\n<li>\n<p>\u041d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\/\u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 JSON &#8212; \u0441 \u0444\u043e\u043a\u0443\u0441\u043e\u043c \u043d\u0430 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 JSON-\u0444\u0430\u0439\u043b\u043e\u0432 &#8212; \u043d\u044e\u0430\u043d\u0441\u044b \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0432 Node.js (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b JSON: MessagePack \u0438 Protocol Buffers &#8212; \u043a\u043e\u0433\u0434\u0430 \u0438 \u043a\u0430\u043a \u0438\u0445 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445.<\/p>\n<\/li>\n<\/ol>\n<p>\u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 JSON \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u0438 \u0445\u043e\u0442\u044f\u0442 \u0433\u043b\u0443\u0431\u0436\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0442\u0435\u043a \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/p>\n<blockquote>\n<p><strong>\u0412\u0430\u0436\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c<\/strong>, \u0447\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e JSON &#8212; \u043e\u043d\u0438 \u043f\u0440\u0438\u0441\u0443\u0449\u0438 \u043b\u044e\u0431\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u043c (XML, YAML \u0438 \u0434\u0440.). \u041c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043b\u0438\u0441\u044c \u043d\u0430 JSON \u043a\u0430\u043a \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0432 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438 Node.js-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u043d\u043e \u0432\u0441\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0435 \u0433\u0440\u0430\u0431\u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0438 \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445.  <\/p>\n<\/blockquote>\n<h3>\u041d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043f\u0440\u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0434\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 JSON (\u0432\u0435\u0431-\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442)<\/h3>\n<h4>\u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438 \u043f\u043e\u0442\u0435\u0440\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u0412 JavaScript (\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 Node.js) \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0440\u0430\u0432\u043d\u043e 2^53 &#8212; 1. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u0435 ID \u0438\u043b\u0438 \u0434\u0435\u043d\u0435\u0436\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u044e\u0442 \u044d\u0442\u043e\u0442 \u043f\u043e\u0440\u043e\u0433, \u0442\u043e \u043f\u0440\u0438 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0435 JSON \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0442\u0438 \u043f\u043e\u0442\u0435\u0440\u044f \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"javascript\">const jsonString = '{\"order_id\": 1234567890123456789, \"price\": 1499.95}'; const data = JSON.parse(jsonString); console.log(data.order_id);  \/\/ 1234567890123456800 \u2014 \u043e\u0448\u0438\u0431\u043a\u0430, \u0445\u0432\u043e\u0441\u0442 \u0447\u0438\u0441\u043b\u0430 \"\u043e\u043a\u0440\u0443\u0433\u043b\u0438\u043b\u0441\u044f\"<\/code><\/pre>\n<p>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\n<p>\u0425\u0440\u0430\u043d\u0438\u0442\u0435 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0446\u0435\u043b\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0432 JSON \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0438: <code>{\"order_id\": \"1234567890123456789\"}<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412 Node.js (\u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 10.4, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445) \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c BigInt \u0434\u043b\u044f \u0442\u043e\u0447\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439: <code>BigInt(\"1234567890123456789\")<\/code>. \u041d\u043e \u0432 JSON \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0441\u0442\u0440\u043e\u043a\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u0441\u0443\u043c\u043c\u044b\/\u0431\u0430\u043b\u0430\u043d\u0441\u044b \u0432 \u0444\u0438\u043d\u0430\u043d\u0441\u043e\u0432\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432 \u0441\u0442\u0440\u043e\u0447\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f (\u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b, \u0441\u043c. \u0440\u0430\u0437\u0434\u0435\u043b \u043f\u0440\u043e ProtoBuf).<\/p>\n<\/li>\n<\/ul>\n<h4>\u0414\u0430\u0442\u044b \u0438 \u0432\u0440\u0435\u043c\u044f<\/h4>\n<p>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 JSON \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u0442\u044b\/\u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0412 \u0432\u0435\u0431-\u0441\u0440\u0435\u0434\u0435 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u0430:<\/p>\n<ol>\n<li>\n<p>ISO 8601: <code>2025-01-04T12:34:56Z<\/code><\/p>\n<\/li>\n<li>\n<p>Unix Timestamp (\u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445 \u0438\u043b\u0438 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445): <code>1672822561000<\/code><\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u044b: <code>04\/01\/2025 12:34:56<\/code>, <code>2025.01.04 12:34:56<\/code> \u0438 \u0442.\u0434.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u0430\u0442\u0443 \u0432\u043d\u0443\u0442\u0440\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>Date<\/code> \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 UTC, \u043d\u043e \u043f\u0440\u0438 \u0432\u044b\u0432\u043e\u0434\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0435\u0451 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u0430\u043d\u0438\u0446\u0443 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438.  <\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u044b\u0434\u0430\u0451\u0442 <code>\"2025-01-04T12:34:56Z\"<\/code>, \u0430 \u043a\u0442\u043e-\u0442\u043e \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u0430\u043a <code>MM\/DD\/YYYY<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0438\u043b\u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u0440\u0435\u0437\u0430\u0442\u044c \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434\u044b \u0438\u0437 \u0434\u0430\u0442\u044b, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0440\u0430\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u043c\u0438.  <\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u0430\u043a \u0440\u0435\u0448\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>\u0421\u043e\u0431\u043b\u044e\u0434\u0430\u0439\u0442\u0435 \u0435\u0434\u0438\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u0434\u043b\u044f \u0434\u0430\u0442, \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 ISO 8601 (UTC).<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438: <a href=\"https:\/\/date-fns.org\/\" rel=\"noopener noreferrer nofollow\">date-fns<\/a>, <a href=\"https:\/\/momentjs.com\/\" rel=\"noopener noreferrer nofollow\">Moment.js<\/a> (\u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0438 \u043d\u0435 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f  ), Day.js, Luxon.<\/p>\n<ul>\n<li>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 <a href=\"https:\/\/tc39.es\/proposal-temporal\/docs\/\" rel=\"noopener noreferrer nofollow\">Temporal API<\/a> (\u043f\u043e\u043a\u0430 \u0432 \u0441\u0442\u0430\u0434\u0438\u0438 \u0447\u0435\u0440\u043d\u043e\u0432\u0438\u043a\u0430), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c Date \u0432 JavaScript.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u041d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 (Node.js) \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u0442 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, PostgreSQL, MongoDB) \u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u0432\u0441\u0451 \u043a UTC.<\/p>\n<\/li>\n<\/ul>\n<h4>\u042d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, Unicode \u0438 \u044d\u043c\u043e\u0434\u0437\u0438<\/h4>\n<p>JSON-\u0441\u0442\u0440\u043e\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0441\u0438\u043c\u0432\u043e\u043b\u044b (<code>\\n<\/code>, <code>\\t<\/code>, <code>\\\"<\/code>, <code>\\\\<\/code>). \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u044d\u043c\u043e\u0434\u0437\u0438 \u0438\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 <code>U+FFFF<\/code>, \u0442\u043e \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043d\u0438 \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u0441\u0443\u0440\u0440\u043e\u0433\u0430\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>\\ud83d\\ude00<\/code> \u0434\u043b\u044f \ud83d\ude00).<\/p>\n<p>\u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u044d\u0442\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u043d\u043e \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:<\/p>\n<ul>\n<li>\n<p>\u0415\u0441\u043b\u0438 JSON-\u0441\u0442\u0440\u043e\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u0442\u0430\u043f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u043b\u0435\u0448\u0438, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u044e \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438, \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435, \u043a \u0441\u043b\u043e\u0436\u043d\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u043c\u0443 &#171;\u043b\u0435\u0441\u0443&#187; \u0441\u043b\u0435\u0448\u0435\u0439.  <\/p>\n<\/li>\n<li>\n<p>\u041d\u0435\u0432\u0435\u0440\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 Unicode \u043d\u0430 \u044d\u0442\u0430\u043f\u0430\u0445 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0438\u043b\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u043c\u0438.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"javascript\">const data = {   text: \"Hello\\nNewLine\",   emoji: \"\ud83d\ude00\" };  const str = JSON.stringify(data); console.log(str); \/\/ {\"text\":\"Hello\\nNewLine\",\"emoji\":\"\\ud83d\\ude00\"}  const parsed = JSON.parse(str); console.log(parsed); \/\/ { text: 'Hello\\nNewLine', emoji: '\ud83d\ude00' }<\/code><\/pre>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 <code>JSON.parse<\/code>\/<code>JSON.stringify<\/code>, \u043d\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0451\u0432 API), \u0441\u0442\u043e\u0438\u0442 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<h4>\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/h4>\n<p>\u0412\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f REST API, \u0447\u0430\u0441\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442 JSON-\u043e\u0442\u0432\u0435\u0442\u044b \u043d\u0430 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u043c\u0435\u0433\u0430\u0431\u0430\u0439\u0442, \u0430 \u043f\u043e\u0442\u043e\u043c \u0443\u0434\u0438\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u043b\u0433\u043e\u043c\u0443 \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0443 \u0438 \u0432\u044b\u0441\u043e\u043a\u043e\u043c\u0443 \u0440\u0430\u0441\u0445\u043e\u0434\u0443 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<ol>\n<li>\n<p>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043b\u0438\u0435\u043d\u0442\u0430: <code>JSON.parse<\/code> \u043a\u0440\u0443\u043f\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430 (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435) \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0432\u0435\u0441\u0438\u0442\u044c UI \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<\/li>\n<li>\n<p>\u041d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (Node.js): <code>JSON.stringify<\/code> \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u043e\u0436\u0435 \u0437\u0430\u0442\u0440\u0430\u0442\u0435\u043d.<\/p>\n<\/li>\n<\/ol>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0435 \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 JSON\u044b:<\/p>\n<ul>\n<li>\n<p>\u041f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0441\u0451 \u0441\u0440\u0430\u0437\u0443. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043b\u0443\u0447\u0448\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u0433\u0438\u043d\u0430\u0446\u0438\u044e, lazy-load \u0438\u043b\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433 \u0442\u0430\u043c, \u0433\u0434\u0435 \u044d\u0442\u043e \u0443\u043c\u0435\u0441\u0442\u043d\u043e (Node.js <code>stream<\/code> + JSON chunking).<\/p>\n<\/li>\n<li>\n<p>\u0421\u0436\u0438\u043c\u0430\u0439\u0442\u0435 \u043e\u0442\u0432\u0435\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>gzip<\/code> \u0438\u043b\u0438 <code>brotli<\/code> \u0432 Express \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/github.com\/expressjs\/compression\" rel=\"noopener noreferrer nofollow\">compression<\/a>).<\/p>\n<\/li>\n<\/ul>\n<h3>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 JSON-\u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 Node.js<\/h3>\n<h4>\u0421\u0442\u0440\u0438\u043c\u0438\u043d\u0433 \u0438 \u043f\u043e\u0442\u043e\u043a\u0438 (Streams API)<\/h4>\n<p>\u0412 Node.js \u043a\u0440\u0430\u0439\u043d\u0435 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u0435 JSON-\u0444\u0430\u0439\u043b\u044b (\u0438\u043b\u0438 \u043f\u043e\u0442\u043e\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445) \u043f\u043e\u044d\u0442\u0430\u043f\u043d\u043e, \u0430 \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0438\u0445 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0432 \u043f\u0430\u043c\u044f\u0442\u044c.<\/p>\n<ul>\n<li>\n<p>SAX-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0430\u0440\u0441\u0435\u0440\u044b \u0434\u043b\u044f JSON: <a href=\"https:\/\/github.com\/uhop\/stream-json\" rel=\"noopener noreferrer nofollow\">stream-json<\/a>, <a href=\"https:\/\/github.com\/dominictarr\/JSONStream\" rel=\"noopener noreferrer nofollow\">JSONStream<\/a>.<\/p>\n<\/li>\n<li>\n<p>\u0427\u0442\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b \u2192 \u043f\u0430\u0440\u0441\u0435\u0440 \u2192 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430: \u0432\u044b \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0435 \u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 <code>fs.createReadStream<\/code>, \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0435 \u0432 \u0441\u0442\u0440\u0438\u043c\u0438\u043d\u0433\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u0441\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044d\u043c\u0438\u0442\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043f\u043e \u043c\u0435\u0440\u0435 \u0447\u0442\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 (\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>stream-json<\/code>):<\/p>\n<pre><code class=\"javascript\">const fs = require('fs'); const { parser } = require('stream-json'); const { streamValues } = require('stream-json\/streamers\/StreamValues');  const readStream = fs.createReadStream('big.json');  readStream   .pipe(parser())   .pipe(streamValues())   .on('data', (data) =&gt; {     \/\/ data.value \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u043a\u0443\u0441\u043e\u043a JSON     console.log(data.value);   })   .on('end', () =&gt; {     console.log('Done processing large JSON!');   });<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, Node.js \u043d\u0435 \u0445\u0440\u0430\u043d\u0438\u0442 \u0432\u0435\u0441\u044c JSON \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e \u0447\u0430\u0441\u0442\u044f\u043c.<\/p>\n<h4>NDJSON \/ JSON Lines<\/h4>\n<p>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0444\u043e\u0440\u043c\u0430\u0442 <a href=\"https:\/\/docs.mulesoft.com\/dataweave\/latest\/dataweave-formats-ndjson\" rel=\"noopener noreferrer nofollow\">NDJSON<\/a> (Newline-Delimited JSON). \u041a\u0430\u0436\u0434\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 &#8212; \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 JSON-\u043e\u0431\u044a\u0435\u043a\u0442:<\/p>\n<pre><code class=\"json\">{\"id\":1,\"name\":\"Item1\"} {\"id\":2,\"name\":\"Item2\"} {\"id\":3,\"name\":\"Item3\"}<\/code><\/pre>\n<p>\u0427\u0438\u0442\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0444\u0430\u0439\u043b \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0440\u0438\u043c\u044b \u0432 Node.js \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"javascript\">const fs = require('fs'); const readline = require('readline');  async function processNDJSON(filePath) {   const fileStream = fs.createReadStream(filePath);   const rl = readline.createInterface({ input: fileStream });    for await (const line of rl) {     const obj = JSON.parse(line);     \/\/ \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 obj     console.log(obj.name);   } }  processNDJSON('items.ndjson');<\/code><\/pre>\n<p>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430:<\/p>\n<ul>\n<li>\n<p>\u041d\u0435 \u043d\u0430\u0434\u043e \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0430\u043c.<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0434\u0443\u0442 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043b\u043e\u0433-\u0441\u0435\u0440\u0432\u0438\u0441), \u0442\u043e NDJSON \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043d\u0430 \u043b\u0435\u0442\u0443.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u044f<\/h4>\n<p>\u0414\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043c\u0435\u0441\u0442\u0430 \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 JSON-\u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043f\u043e HTTP \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u0435\u043d\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 gzip \u0438\u043b\u0438 brotli-\u0441\u0436\u0430\u0442\u0438\u0435:<\/p>\n<pre><code class=\"javascript\">const express = require('express'); const compression = require('compression');  const app = express(); app.use(compression()); \/\/ \u0412\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0441\u0436\u0430\u0442\u0438\u0435  app.get('\/api\/data', (req, res) =&gt; {   const bigObject = generateHugeObject();   res.json(bigObject); });  app.listen(3000, () =&gt; {   console.log('Server running...'); });<\/code><\/pre>\n<p>\u041d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0435\u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0432\u0435\u0442, \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u0440\u0430\u0441\u043f\u0430\u0440\u0441\u0438\u0442\u044c JSON. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0432\u0430\u0448 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 JSON-\u0444\u0430\u0439\u043b\u044b \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0434\u0440\u0443\u0433\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u0442\u043e\u0436\u0435 \u0443\u043c\u0435\u0435\u0442 \u0434\u0435\u043a\u043e\u043c\u043f\u0440\u0435\u0441\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442).<\/p>\n<h3>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b JSON: MessagePack \u0438 Protocol Buffers \u0434\u043b\u044f \u0432\u0435\u0431<\/h3>\n<p><a href=\"https:\/\/msgpack.org\/\" rel=\"noopener noreferrer nofollow\">\u042d\u0442\u043e \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u043d\u0430 JSON (\u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u0441\u0442\u0440\u043e\u043a\u0438, \u0447\u0438\u0441\u043b\u0430), \u043d\u043e \u0432 \u0431\u043e\u043b\u0435\u0435 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u043c \u0432\u0438\u0434\u0435.<\/p>\n<p>\u041f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041c\u0435\u043d\u044c\u0448\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 (\u043d\u0430 20-50% \u043c\u0435\u043d\u044c\u0448\u0435 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 JSON).<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0441\u043e\u043a\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0430\u0440\u0441\u0438\u043d\u0433\u0430 (\u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442).<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0432\u043a\u043b\u044e\u0447\u0430\u044f JavaScript\/Node.js (<a href=\"https:\/\/github.com\/mcollina\/msgpack5\" rel=\"noopener noreferrer nofollow\">msgpack5<\/a>).<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041c\u0435\u043d\u044c\u0448\u0430\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e-\u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c (\u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u043d\u0435 \u0442\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c).<\/p>\n<\/li>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 (\u043d\u0443\u0436\u0435\u043d \u0434\u0435\u043a\u043e\u0434\u0435\u0440).<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 (Node.js \u0441 <a href=\"https:\/\/github.com\/mcollina\/msgpack5\" rel=\"noopener noreferrer nofollow\">msgpack5<\/a>):<\/p>\n<pre><code class=\"javascript\">const msgpack = require('msgpack5')();  const data = {   user: 'Alice',   age: 30,   scores: [10, 20, 30] };  const packed = msgpack.encode(data); console.log('Packed buffer:', packed);  const unpacked = msgpack.decode(packed); console.log('Unpacked:', unpacked);<\/code><\/pre>\n<p>\u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 MessagePack \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438 \u043e\u0431\u044a\u0451\u043c\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u0432\u044b\u0441\u043e\u043a\u043e\u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u0445.<\/p>\n<p><a href=\"https:\/\/protobuf.dev\/\" rel=\"noopener noreferrer nofollow\"><strong>Protocol Buffers (Protobuf)<\/strong> <\/a>&#8212; \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0442 Google, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 <code>.proto<\/code>-\u0444\u0430\u0439\u043b\u0435 (\u0441\u0445\u0435\u043c\u0430). \u041d\u0430 \u0431\u0430\u0437\u0435 \u044d\u0442\u043e\u0439 \u0441\u0445\u0435\u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0434 (\u043a\u043b\u0430\u0441\u0441\u044b) \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432.<\/p>\n<p>\u041f\u043b\u044e\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u0412\u044b\u0441\u043e\u043a\u0430\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c (\u043f\u0430\u0440\u0441\u0438\u043d\u0433, \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445).<\/p>\n<\/li>\n<li>\n<p>\u0421\u0442\u0440\u043e\u0433\u0430\u044f \u0442\u0438\u043f\u0438\u0437\u0430\u0446\u0438\u044f \u0438 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0418\u0434\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043d\u0430 gRPC.<\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0438\u043d\u0443\u0441\u044b:<\/p>\n<ul>\n<li>\n<p>\u041d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c <code>.proto<\/code>-\u0441\u0445\u0435\u043c\u0443 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u043d\u044c\u0448\u0430\u044f \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c \u0432 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441 JSON (\u0441\u043b\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u00ab\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435\u00bb \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b).<\/p>\n<\/li>\n<\/ul>\n<p>\u0423\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0421\u0445\u0435\u043c\u0430 (<code>user.proto<\/code>):<\/p>\n<pre><code class=\"typescript\">syntax = \"proto3\";  message User {   string name = 1;   int32 age = 2;   repeated int32 scores = 3; }<\/code><\/pre>\n<p>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c protoc \u0438 \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f Node.js, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c JS-\u043a\u043e\u0434. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u0432\u0438\u0434\u0430 <code>user_pb.js<\/code>.<\/p>\n<pre><code class=\"javascript\">const messages = require('.\/user_pb'); \/\/ \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434  const user = new messages.User(); user.setName('Alice'); user.setAge(30); user.setScoresList([10, 20, 30]);  const bytes = user.serializeBinary(); console.log('Binary length:', bytes.length);  const user2 = messages.User.deserializeBinary(bytes); console.log(user2.getName(), user2.getAge(), user2.getScoresList()); <\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c Protobuf \u0432 \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b, \u0435\u0441\u043b\u0438 \u0432\u044b \u0441\u0442\u0440\u043e\u0438\u0442\u0435<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-444887","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/444887","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=444887"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/444887\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=444887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=444887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=444887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}