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



I had the same problem but a quick scan of the code tells you to include this:

/define YAJL_C_PROTOTYPES <<<<<<INCLUDE THIS LINE
/include yajl_h

I guess it is something that was introduced after the program was written.


-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Henrik Rützou
Sent: 02 June 2015 13:37
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] receiving POST encoded in JSON

Scott

I'm trying to compile this simple program but is says the yajl_tree_free() is undefined, is the something I have missed?

H DFTACTGRP(*NO) ACTGRP('KLEMENT') OPTION(*SRCSTMT) H BNDDIR('YAJL') DECEDIT('0.')

/include yajl_h

d docNode s like(yajl_val)
d errmsg s 500a varying inz('')

/free
docNode = yajl_stmf_load_tree( '/sample.json':errmsg);
yajl_tree_free(docNode);
*inlr = *on;
/end-free

On Mon, Jun 1, 2015 at 10:48 PM, Kevin Turner < kevin.turner@xxxxxxxxxxxxxxxxxxxx> wrote:

Not as stunned as me - because I am using it in production, and now
face a rather onerous re-engineering process :( Serves me right for
not doing more thorough research into the options. On the flip side,
it does help me explain some trouble performance bottlenecks.

As it happens, I do have a "use case" where I need to walk through a
JSON with no prior knowledge of its exact content. It involves simply
comparing the JSON (a data model for a context) with the previous
version (stored in a session) to work out what the delta is. I
basically need to know that a node is new, missing or changed to build
the delta with no assumed knowledge of what the nodes are. I expect
the yajl_xxxx_parse will enable me to do this.


-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Nathan
Andelin
Sent: 01 June 2015 21:39
To: Web Enabling the IBM i (AS/400 and iSeries)
Subject: Re: [WEB400] receiving POST encoded in JSON

Scott,

Thanks for the additional information. I was so stunned by Kevin's
report of performance differences between your service program and
that of Mihael Schmidt; I was looking for an explanation.
Unfortunately, I'm not well versed in either; I haven't had a
requirement to "consume" JSON under IBM i yet. I'm interested in the topic, however.

I agree that "applications" typically know the format of JSON
documents in advance. An API that makes it easy to "find" the content
you're looking for is intuitive in that case.

I've been toying with writing a JavaScript utility that "merges" HTML
templates with JSON objects, where neither the format of the HTML nor
the JSON would be known in advance. I suppose that may have triggered
the idea of a similar use case under IBM i, though that is just an
abstract notion at this point.

I view the topic of JSON to be relevant to the topic of single-page
applications, client-side frameworkd, and possibly server-side
web-service frameworks, which we have been discussing during the past few weeks.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.


___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is
intended by CoralTree Systems Ltd for the use of the named individuals
or entity to which it is directed and may contain information that is
privileged or otherwise confidential. If you have received this
electronic mail transmission in error, please delete it from your
system without copying or forwarding it, and notify the sender of the
error by reply email or by telephone, so that the sender's address records can be corrected.




----------------------------------------------------------------------
----------


CoralTree Systems Limited
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton
Hampshire
SO15 2EA
VAT Registration Number 834 1020 74.
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.




--
Regards,
Henrik Rützou

http://powerEXT.com <http://powerext.com/>
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/web400.


___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton
Hampshire
SO15 2EA
VAT Registration Number 834 1020 74.

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.