comp.lang.ada
 help / color / mirror / Atom feed
* problems parse (large) json file with gnatcoll.json
@ 2016-04-18 18:21 Björn Lundin
  2016-04-18 18:51 ` Jeffrey R. Carter
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Björn Lundin @ 2016-04-18 18:21 UTC (permalink / raw)


Hi!
I got a json file which is sized around 4 Mb

$ ls -la menu.json
-rwxr--r-- 1 bnl bnl 4814417 apr 18 17:07 menu.json

Platform is Linux 64-bit (debian)

My problem is that I don't see a way to open
a file and parse it, I just see the possibility to parse a string.

And reading the file into a string gives Storage_Error.
Or actually, declaring a string sub_type does.


function Load_File(Filename : in String) return String is
   use Ada.Directories;
   File_Size    : constant Natural := Natural (Size (Filename));
   subtype Test_JSON_Str is String (1 .. File_Size);   <-- Storage_Error



ulimit is at 8192 kb and I increase it to 16384
(that is max what I can see)
$ ulimit -s
16384

So - what is my options here?

(The json file and its size is out of my control)

--
Björn

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-04-25 15:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-18 18:21 problems parse (large) json file with gnatcoll.json Björn Lundin
2016-04-18 18:51 ` Jeffrey R. Carter
2016-04-18 19:05   ` Björn Lundin
2016-04-19 19:48     ` Shark8
2016-04-20  7:50       ` AdaMagica
2016-04-21  8:44       ` Björn Lundin
2016-04-25 10:38     ` briot.emmanuel
2016-04-25 15:12       ` Björn Lundin
2016-04-18 18:59 ` joakimds
2016-04-18 19:23   ` Björn Lundin
2016-04-19  8:17 ` Jacob Sparre Andersen
2016-04-19  9:14   ` Björn Lundin
2016-04-19  9:56 ` gautier_niouzes
2016-04-19 12:49   ` G.B.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox