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



As I and others have pointed out Booth you need to process the data with a cursor! It is returning a result set - not an array.

Look at the earlier example that was posted - it included all the code you needed - custom and all.

I would suggest that as Peter suggested you just use httpclob to get the data. Then look at it. Is it the same as we have been using in the examples? If yes then it should "just work". If the json returned has extra stuff or is missing bits then you need to look for some of the stuff Scott Forstie recently published on "fixing" bad json so that it can be used by json_table.




On Nov 18, 2019, at 4:46 PM, Booth Martin <booth@xxxxxxxxxxxx> wrote:

That may be, Jon. Yes, the examples everyone provided work as provided. The issue is that I am not trying to read from a file; this is a datastream.

And yes, httgetclob does get the data but that is only half the task. json_table(httpgetclob...) has to also deliver the data in RPG-usable form. Otherwise it isn't useful. It does work just fine for non-array json.

It is the json array that is the issue. Any documentation I find is pretty clear that I need to use both lax and nested. SQLRPGLE appears to me to understand lax but not understand nested.

As to using a loop... there is nothing I see to loop through.


On 11/18/2019 2:35 PM, Jon Paris wrote:
Because while you are using it for the task you have set yourself it is irrelevant to the question at hand.

httpgetclob was completely unrelated to the issues you had -
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/web400.



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.