|
Have you looked at the base YAJL docs Brad? I'm in a hurry or I'd check -
but I found a couple fo useful "bits" when I went through them.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
On Mar 7, 2018, at 11:12 AM, Bradley Stone <bvstone@xxxxxxxxx> wrote:looking
I am looking into trying to read through one set of JSON data and write
certain objects/trees to a new JSON file.
Example:
yajl_genOpen(*OFF);
yajl_beginObj(); //main JSON object
yajl_beginArray('newList');
// load the old JSON data from a stream file
docNode = yajl_stmf_load_tree(jsonFile);
//find the array "list"
myList = YAJL_object_find(docNode: 'list');
i = 0;
dow YAJL_ARRAY_LOOP(myList:i:node );
yajl_beginObj();
//****write the contents of the "node" array object to the new JSON
buffer*****
yajl_endObj();
enddo;
yajl_tree_free(docNode);
yajl_endArray(); //newList
yajl_endObj(); //main JSON object
yajl_genClose();
I have tried:
yajl_addChar(yajl_stringifyStr(node));
But that stringifies and "escapes" the old JSON data. So what I'm
for is something like:list
yajl_addNode(node);
Where it will take a node loaded from another JSON object and add it
directly to the new JSON buffer. Not sure if that's possible. Just want
to make sure there isn't something already out there that may do this
before I try digging into making a solution.
Thanks!
Bradley V. Stone
www.bvstools.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
To post a message email: MIDRANGE-L@xxxxxxxxxxxxquestions.
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
link: http://amzn.to/2dEadiD
Help support midrange.com by shopping at amazon.com with our affiliate
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.