Hi.
I'm using Scott Klement YAJL library to read from a rpgle program a json file with long key values (the key values are paths of devices).
Here an example:

{
"return": [
{
"x000002.001": {
"/var/lib/docker/containers/cc1b32cb7175dec13c0beac61ace0b3e82018aba025c6a43316d0229d5603c39/mounts/shm": "0%",
"/dev": "0%",
"/boot": "8%",
"/sys/fs/cgroup": "0%",
"/": "24%",
"/var/lib/docker/containers/0f2051d3d6bbe3490edd1efed2b9a6753809b8c532e96b0f986985bb7eadab99/mounts/shm": "0%",
"/var/lib/docker/overlay2/832d608e79518904e1546996b6badba28a39ed85035795659e500d3fc1f6e7da/merged": "24%",
"/run": "1%",
"/dev/shm": "1%",
"/var/lib/docker/overlay2/958a0767d640e22c66d0f5d5a2b023ebe59faa921425f4b6a7483c488826a17d/merged": "24%"
},
"x000001.001": {
"/home": "5%",
"/dev": "0%",
"/boot": "8%",
"/sys/fs/cgroup": "0%",
"/": "29%",
"/run": "10%",
"/var/lib/docker/containers/d80f2199b7857e11bd96d7296691af36e36119afced301f7b8f57b9f5fb19c67/mounts/shm": "0%",
"/var/lib/docker/overlay2/51ef00f3cb9fb411eb7ac93a973bad6a1b1a24e8aec9a63a3c07097c8b7a6d5d/merged": "29%",
"/dev/shm": "1%"
},
"x000001.002": {
"/home": "2%",
"/dev": "0%",
"/boot": "8%",
"/var/lib/docker/overlay2/b9fd3d45f0e49d0d80f156c3bfe6113bc0391dcd8233974457bf8ddab156a68a/merged": "6%",
"/": "6%",
"/sys/fs/cgroup": "0%",
"/run": "2%",
"/var/lib/docker/containers/26f95cbd4b2aaa8ddc6f5111518be6e3ac862af46512212abac313837bb01510/mounts/shm": "0%",
"/dev/shm": "1%"
},
"x000001.003": false
}
]
}

The procedure YAJL_OBJECT_ELEM return a key of 50 char varying retrieving the value from a pointer.

D YAJL_OBJECT_ELEM...
D PR like(yajl_val)
D node like(yajl_val) value
D idx 10i 0 value
D key 50a varying

So i tried to define key as 500 char varying in all the procedures and recompile the entire library.

D YAJL_OBJECT_ELEM...
D PR like(yajl_val)
D node like(yajl_val) value
D idx 10i 0 value
D key 500a varying

That worked fine for me so I would like to ask Mr Klement for a change in future versions of YAJL library.
Thanks!

Marco

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].