× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yep. Pouring through the source too. Can't find anything. I don't want
to modify the C source either.. been a while for that.. lol.

If there was a way to parse through a tree without knowing the names and
values/types I could probably do it that way,. But I'd like to say "take
this node, and insert it in the json I'm generating".

Right now it "almost" works with yajl_addChar(yajl_stringifyStr(node))
except that it of course escapes quotes and slashes, etc. And that seems
to be a setting in the C source.

Bradley V. Stone
www.bvstools.com
MAILTOOL Benefit #13 <https://www.bvstools.com/mailtool.html>: The ability
to use an IFS stream file as the body of the email (either text or html).

On Wed, Mar 7, 2018 at 11:38 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

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:

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
looking
for is something like:

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
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

--
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 thread ...

Follow-Ups:
Replies:

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

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.