|
i have the following code and trying to get this up and running (from a
working copy at a prior shop)... but yajl_get_string is returning
nothing... what should I look for?
EVAL jsoninp
JSONINP =
....5...10...15...20...25...30...35...40...45...50...55...60
1 '{"length":"121","string":"{\"env\":\"dev\",\"command\":\"GET'
61 '_LOAN_BORROWER\",\"payload\":[{\"loanNumber\":0000002428}]}"'
121 '} '
181 ' '
// load jSON object
g_docNode = yajl_buf_load_tree(%addr(jsonINP) + 2
:%len(%trim(jsonINP))
:g_errMsg);
return g_errMsg;
g_node = YAJL_object_find(g_docNode: 'env');
if yajl_is_false(g_node);
g_errMsg = 'Error - env Not Found In Input';
return g_errMsg;
endif;
g_environment = yajl_get_string(g_node);
Again, everything runs successfully until the last statement (and this used
to be working code on another box)... g_environment ends up with blanks...
what am I overlooking?
Jay
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.