From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a5d:84d5:: with SMTP id z21mr4806955ior.24.1543214528402; Sun, 25 Nov 2018 22:42:08 -0800 (PST) X-Received: by 2002:a9d:5403:: with SMTP id j3mr400646oth.2.1543214528209; Sun, 25 Nov 2018 22:42:08 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!q69no405548itb.0!news-out.google.com!v141ni460ita.0!nntp.google.com!q69no405544itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 25 Nov 2018 22:42:07 -0800 (PST) In-Reply-To: <9524b3ee-476f-4af6-ab83-b15a6c2a417c@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=151.249.135.130; posting-account=M7mWIgoAAACGA_Fxpu1-vAqIUttmwREB NNTP-Posting-Host: 151.249.135.130 References: <9524b3ee-476f-4af6-ab83-b15a6c2a417c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: GNATCOLL JSON Parsing From: eduardsapotski@gmail.com Injection-Date: Mon, 26 Nov 2018 06:42:08 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:54891 Date: 2018-11-25T22:42:07-08:00 List-Id: Again problem ... I'm trying parse such result: https://api.exmo.com/v1/pair_settings/ function Get_Pair_Settings return Pair_Settings_Vector_Package.Vector is JSON : Unbounded_String :=3D Null_Unbounded_String; URL_Str : Unbounded_String :=3D To_Unbounded_String("https://api.exmo= .com/v1/pair_settings/"); =20 Current_JSON_Item, JSON_Main_Node : JSON_Value :=3D Create; JSON_Result_Array : JSON_Array :=3D Empty_Array;=20 =20 Result : Pair_Settings_Vector_Package.Vector; begin JSON :=3D To_Unbounded_String(Message_Body(Get(URL =3D> To_String(URL= _Str)))); JSON_Main_Node :=3D Read(JSON); =20 JSON_Result_Array :=3D Get(JSON_Main_Node); =20 if Length(JSON_Result_Array) > 0 then for i in 1 .. Length(JSON_Result_Array) loop Put_Line("123"); end loop; end if; =20 return Result; =20 end; ... raised CONSTRAINT_ERROR : gnatcoll-json.adb:1328 discriminant check failed Bj=C3=B6rn, hope only on you :))