{"id":195496,"date":"2013-09-27T12:32:03","date_gmt":"2013-09-27T08:32:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=195496"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=195496","title":{"rendered":"<span class=\"post_title\">\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 JSON \u043d\u0430 PL\/SQL<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u0411\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0432\u0447\u0435\u0440\u0430 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/JSON\">JSON<\/a> \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0445\u0440\u0430\u043d\u0438\u043c\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0435 Oracle. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0432\u0435\u0449\u0435\u0439 \u0432 Oracle \u0438 \u0431\u044b\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 <a href=\"http:\/\/www.oracle.com\/technetwork\/articles\/java\/json-1973242.html\">Java<\/a>, \u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0447\u0435\u0433\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 PL\/SQL. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u0440\u044b\u0432\u0430 \u044f \u0438 \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e \u043d\u0430 \u0441\u0443\u0434 \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u0412\u0434\u0440\u0443\u0433 \u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c. \u041f\u0443\u0441\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u0435\u0436\u0430\u0442 \u0432 CLOB-\u043f\u043e\u043b\u0435 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<pre><code class=\"sql\">create table ae_spec (   id             number                           not null,   name           varchar2(30)                     not null,   json           CLOB );  alter table ae_spec add   constraint pk_ae_spec primary key(id); <\/code><\/pre>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0432 \u0434\u0435\u0440\u0435\u0432\u043e, \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u043d\u043e\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0442\u043e\u0439-\u0436\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre><code class=\"sql\">create global temporary table ae_json (   id                 number                           not null,   parent_id          number,   name               varchar2(1000),   value              varchar2(1000) ) on commit delete rows; <\/code><\/pre>\n<p>  \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u044d\u0442\u0443 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u044e \u043c\u043e\u0449\u044c SQL \u0434\u043b\u044f \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0417\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">create or replace package ae_spec_pkg as     procedure compile(p_name in varchar2); end ae_spec_pkg; \/  create or replace package body ae_spec_pkg as      procedure compile(p_name in varchar2) as     begin       -- \u0420\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c JSON       load(p_name);       -- TODO: \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435            commit;     exception       when others then         rollback;         raise;     end;  end ae_spec_pkg; \/ <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0420\u0430\u0437\u0431\u043e\u0440 JSON \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0435 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b. \u0417\u0430\u0434\u0430\u0447\u0435\u0439 \u0441\u043a\u0430\u043d\u0435\u0440\u0430 (\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 load) \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438\u0437 \u043d\u0435\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/%D0%9B%D0%B5%D0%BA%D1%81%D0%B5%D0%BC%D0%B0_%28%D0%B8%D0%BD%D1%84%D0%BE%D1%80%D0%BC%D0%B0%D1%82%D0%B8%D0%BA%D0%B0%29\">\u043b\u0435\u043a\u0441\u0435\u043c<\/a>:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0430\u043d\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">create or replace package body ae_spec_pkg as      g_spec_state  constant number default 0;     g_name_state  constant number default 1;          procedure lexem(p_state in number                    ,p_value in varchar2) as     begin       insert into ae_script_log(id, tp, value)       values (ae_script_log_seq.nextval, p_state, p_value);     end;                         procedure load(p_name in varchar2) as     l_lob  CLOB;     l_str  varchar2(1000) default null;     l_len  number default null;     l_pos  number default 1;     l_ix   number default 1;     l_st   number default g_spec_state;     l_ch   varchar2(1) default null;     l_val  varchar2(1000) default null;     l_qt   varchar2(1) default null;     l_bs   number default 0;     begin       select json into l_lob from ae_spec where name = p_name for update;        dbms_lob.open(l_lob, dbms_lob.lob_readonly);       l_len := dbms_lob.getlength(l_lob);       while l_pos &lt;= l_len loop         l_str := dbms_lob.substr(l_lob, 1000, l_pos);         l_ix := 1;         while l_ix &lt;= length(l_str) loop           l_ch := substr(l_str, l_ix, 1);           if not l_qt is null then              if l_bs = 1 then                 if not l_ch in (chr(13), chr(10)) then                    l_val := l_val || l_ch;                    l_bs := 0;                 end if;                 goto l;              end if;              if l_ch = '\\' then                 l_bs := 1;                 goto l;              end if;              if l_ch = l_qt then                 lexem(l_st, l_val);                 l_st := g_spec_state;                 l_qt := null;              else                 l_val := l_val || l_ch;              end if;              goto l;           end if;           if l_ch in ('{', '}', '[', ']', ':', ',', ' ', chr(9), chr(13), chr(10)) then              if l_st = g_name_state then                 lexem(l_st, l_val);              end if;              if l_ch in ('{', '}', '[', ']', ':', ',') then                 lexem(g_spec_state, l_ch);              end if;              l_st := g_spec_state;              goto l;           end if;           if l_ch in ('''', '&quot;') then              l_val:= null;              l_qt := l_ch;              l_st := g_name_state;              l_bs := 1;              goto l;           end if;           if l_st = g_name_state then              l_val := l_val || l_ch;           else              l_val := l_ch;              l_st  := g_name_state;           end if;           &lt;&lt;l&gt;&gt;           l_ix := l_ix + 1;         end loop;         l_pos := l_pos + 1000;       end loop;       if l_st = g_name_state then          lexem(l_st, l_val);       end if;       dbms_lob.close(l_lob);     exception       when others then         if dbms_lob.isopen(l_lob) = 1 then dbms_lob.close(l_lob); end if;          raise;     end;     ... end ae_spec_pkg; \/ <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 JSON \u2014 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0430\u0442, \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u043a\u0430\u043d\u0435\u0440\u0443 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0443\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 (g_spec_state \u2014 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0438 g_name_state \u2014 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f \u0432\u0432\u043e\u0434\u0430 \u0438\u043c\u0435\u043d\u0438 \u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f). <\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0430, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043c\u0435\u0449\u0430\u0442\u044c \u0432 \u0442\u0430\u0431\u043b\u0438\u0447\u043a\u0443 \u2014 \u043b\u043e\u0433. \u0423\u0431\u0435\u0434\u0438\u0432\u0448\u0438\u0441\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445, \u0447\u0442\u043e \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u043e, \u0432\u043d\u0435\u0441\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 lexem, \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0434\u0435\u0440\u0435\u0432\u043e (\u043f\u043e\u043f\u0443\u0442\u043d\u043e \u0432\u043d\u043e\u0441\u0438\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 load, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e):<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u0441\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">create or replace package body ae_spec_pkg as      g_spec_state  constant number default 0;     g_name_state  constant number default 1;          e_syntax_error        EXCEPTION;     pragma EXCEPTION_INIT(e_syntax_error, -20001);      procedure lexem(p_state in number                    ,p_value in varchar2                    ,p_node  in out NOCOPY number) as     l_id number default null;     l_vl ae_json.name%type;                        begin       if p_state = g_spec_state then          if p_value in ('}', ']', ',') then             select parent_id into p_node from ae_json where id = p_node;           end if;          if p_value in ('{', '[', ',') then             select max(id) + 1 into l_id from ae_json;             insert into ae_json(id, parent_id) values (l_id, p_node);             p_node := l_id;          end if;          if p_value = ':' then             select name into l_vl from ae_json where id = p_node;             if l_vl is null then                RAISE_APPLICATION_ERROR(-20001, 'Syntax error');             end if;          end if;       else          select name into l_vl from ae_json where id = p_node;          if l_vl is null then             update ae_json set name = p_value where id = p_node;          else             select value into l_vl from ae_json where id = p_node;             if not l_vl is null then                RAISE_APPLICATION_ERROR(-20001, 'Syntax error');             end if;             update ae_json set value = p_value where id = p_node;          end if;       end if;     end;                         procedure load(p_name in varchar2) as     l_lob  CLOB;     l_str  varchar2(1000) default null;     l_len  number default null;     l_pos  number default 1;     l_ix   number default 1;     l_st   number default g_spec_state;     l_ch   varchar2(1) default null;     l_val  varchar2(1000) default null;     l_qt   varchar2(1) default null;     l_bs   number default 0;     l_node number default 0;     begin       insert into ae_json(id) values (l_node);       select json into l_lob from ae_spec where name = p_name for update;        dbms_lob.open(l_lob, dbms_lob.lob_readonly);       l_len := dbms_lob.getlength(l_lob);       while l_pos &lt;= l_len loop         l_str := dbms_lob.substr(l_lob, 1000, l_pos);         l_ix := 1;         while l_ix &lt;= length(l_str) loop           l_ch := substr(l_str, l_ix, 1);           if not l_qt is null then              if l_bs = 1 then                 if not l_ch in (chr(13), chr(10)) then                    l_val := l_val || l_ch;                    l_bs := 0;                 end if;                 goto l;              end if;              if l_ch = '\\' then                 l_bs := 1;                 goto l;              end if;              if l_ch = l_qt then                 lexem(l_st, l_val, l_node);                 l_st := g_spec_state;                 l_qt := null;              else                 l_val := l_val || l_ch;              end if;              goto l;           end if;           if l_ch in ('{', '}', '[', ']', ':', ',', ' ', chr(9), chr(13), chr(10)) then              if l_st = g_name_state then                 lexem(l_st, l_val, l_node);              end if;              if l_ch in ('{', '}', '[', ']', ':', ',') then                 lexem(g_spec_state, l_ch, l_node);              end if;              l_st := g_spec_state;              goto l;           end if;           if l_ch in ('''', '&quot;') then              l_val:= null;              l_qt := l_ch;              l_st := g_name_state;              l_bs := 1;              goto l;           end if;           if l_st = g_name_state then              l_val := l_val || l_ch;           else              l_val := l_ch;              l_st  := g_name_state;           end if;           &lt;&lt;l&gt;&gt;           l_ix := l_ix + 1;         end loop;         l_pos := l_pos + 1000;       end loop;       if l_st = g_name_state then          lexem(l_st, l_val, l_node);       end if;       if l_node &lt;&gt; 0 then          RAISE_APPLICATION_ERROR(-20001, 'Syntax error');       end if;       dbms_lob.close(l_lob);     exception       when others then         if dbms_lob.isopen(l_lob) = 1 then dbms_lob.close(l_lob); end if;          raise;     end;          procedure compile(p_name in varchar2) as     begin       load(p_name);       -- TODO:            commit;     exception       when others then         rollback;         raise;     end;  end ae_spec_pkg; \/ <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044f \u043d\u0435 \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 JSON-\u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0448\u0438\u0441\u044c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c \u043e\u0448\u0438\u0431\u043e\u043a \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0449\u0438\u0445 \u043a \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0439 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u044d\u0442\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0435 \u0432 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043e\u0442\u043a\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0441\u0435\u0440 (\u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u043d\u043e \u0441 \u043c\u043e\u0435\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b) \u0434\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0430\u0431\u043b\u0435\u043d\u0438\u044f \u0432 \u0447\u0430\u0441\u0442\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435, \u0432\u043e\u043e\u0431\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u043d\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0435\u0435 <a href=\"http:\/\/jsonlint.com\/\">\u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u044e<\/a> \u043a\u0430\u043a JSON-\u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<pre><code>{ tables:     { AD_ACTIVATION_TYPE:              { ID:               { attribute:  id }                                                  , ACT_DATE:         { attribute:  start_date                                                                       , sql:       &quot;is null&quot;                                                                      }                                                  , ACT_PRIORITY:     { attribute:  priority }                                                  , TYPE_ID:          { attribute:  subtype }                                                  , ACT_STATE:        { attribute:  state                                                                       , sql:       &quot;= 1&quot;                                                                      }                                                  }               } , attributes: { id:                              { type:               integer                                                  , is_mandatory                                                  }               , start_date:                      { type:               date }               , priority:                        { type:               integer }               , subtype:                         { type:               integer                                                  , is_mandatory                                                   }               , state:                           { type:               integer                                                  , is_mandatory                                                   }               } } <\/code><\/pre>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0440\u0430\u0437\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0436\u0435\u0441\u0442\u043e\u0447\u0438\u0442\u044c, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043d\u043e \u044f \u043d\u0435 \u0432\u0438\u0436\u0443 \u0432 \u044d\u0442\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0441\u043c\u044b\u0441\u043b\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 JSON \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445 \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0435\u0441\u043b\u0438 \u043c\u043e\u0439 \u043f\u043e\u0441\u0442 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0443-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c.      \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\/195496\/\"> http:\/\/habrahabr.ru\/post\/195496\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u0411\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u0432\u0447\u0435\u0440\u0430 \u0432\u043d\u0435\u0437\u0430\u043f\u043d\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/JSON\">JSON<\/a> \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0445\u0440\u0430\u043d\u0438\u043c\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0435 Oracle. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0432\u0435\u0449\u0435\u0439 \u0432 Oracle \u0438 \u0431\u044b\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 <a href=\"http:\/\/www.oracle.com\/technetwork\/articles\/java\/json-1973242.html\">Java<\/a>, \u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0447\u0435\u0433\u043e-\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 PL\/SQL. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0432\u043e\u0435\u0433\u043e \u043f\u043e\u0440\u044b\u0432\u0430 \u044f \u0438 \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e \u043d\u0430 \u0441\u0443\u0434 \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u0412\u0434\u0440\u0443\u0433 \u043a\u043e\u043c\u0443 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.  <\/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-195496","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/195496","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=195496"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/195496\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=195496"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=195496"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=195496"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}