Very useful Tim - many thanks.



On Nov 19, 2019, at 4:49 AM, Tim Fathers <X700-IX2J@xxxxxxxxxxx> wrote:

Ok, here's a complete example of calling a JSON webservice from embedded RPG https://github.com/fathert/json-rpg-example/blob/master/open-weather.sqlrpgle

It uses the sample APIs provided at OpenWeatherMap (https://openweathermap.org/current#severalid) As it's only a sample API, any old input gives the same output, which you can see by clicking on the link on the website.

I hope this helps.

Tim.


________________________________
From: WEB400 <web400-bounces@xxxxxxxxxxxxxxxxxx> on behalf of Booth Martin <booth@xxxxxxxxxxxx>
Sent: 18 November 2019 20:29
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxxxxxxxx>
Subject: Re: [WEB400] json_table(httpgetclob, nested array

First, thank you. I appreciate this. A lot. Today Booth will be
learning about "coalesce."

Nagging question: I am not seeing httpgetclob being mentioned. Why
not? Is no one using it regularly?


On 11/18/2019 11:44 AM, Tim Fathers wrote:
I've knocked up an extremely simple embedded SQL example here that might be helpfulhttps://github.com/fathert/json-rpg-example

You can deal with your issue below by coalescing away the nulls, as in my example above, or by adding null indicator fields to the fetch. If you want an example of this I can change or add this.

Tim.
--
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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fweb400&amp;data=02%7C01%7C%7C5641f14ae21d4b5d508008d76c5da6b2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637097021788455886&amp;sdata=O6MT5iMab0cXubERGGRcAGUgY7%2FAnhvSFz7qaDjgKzs%3D&amp;reserved=0
or email: WEB400-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fweb400&amp;data=02%7C01%7C%7C5641f14ae21d4b5d508008d76c5da6b2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637097021788455886&amp;sdata=%2FclUT7l0%2FCYlH%2FVllpJgW8ZHeI9LJGk%2FahLeJtQyKuo%3D&amp;reserved=0.

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