× 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 do. I don't see how you wouldn't. I've done many projects with JSON and
it's ALWAYS come in handy.

I can't believe IBM doesn't think it would be (I assume for IWS).


On Sun, Jul 28, 2019 at 1:11 PM Roberto De Pedrini <roberto.faq400@xxxxxxxxx>
wrote:

I'm with Bradley, if you save original inbound JSON to your web service you
could use it to re-run a call to it or as a log.
I asked IBM lab to have the inbound JSON as metadata in some kind of
environment variables when I deploy my post-rest web services with IWS but
they didn't consider it so important.
Does anybody need to see inbound json in RPG/Cobol for web service logging?

Roberto De Pedrini
Faq400 - Italy


Il giorno mer 24 lug 2019 alle ore 01:03 B Stone <bvstone@xxxxxxxxx> ha
scritto:

It comes in VERY hand for debugging and logging what data actually came
in. I've used in at many clients and shared the new procedure with the
OP.

I didn't want to change anything in your code, and wanted to make is so
if
I install a newer version all I do is take mine and leave it at the
bottom.

So that's why I made it separate with the optional stream file parm so if
debug for the application is on, I supply the file name. If not, I don't
and it isn't created. If you add the option I'd use that instead of
mine.
Overwriting would be my choice. I always use unique IDs in production
for
debugging/trace file names so overwriting isn't an issue. That's just
me,
though.

I think in all it was an addition of maybe 6 lines of code.

I remember asking the OPs same question a few years ago and people
questioned why I would want that. If you can't see the data coming in,
how
do you know if it was correct. Right? Or what if it's required to
log/store the data (as it is for a couple of my clients)?

It's a simple update that adds a lot of functionality.

Bradley V. Stone
www.bvstools.com
Need to interface with Braintree with your IBM i? Contact me
<https://www.bvstools.com/contact.html> for more information!

On Tue, Jul 23, 2019 at 5:17 PM Scott Klement <
midrange-l@xxxxxxxxxxxxxxxx

wrote:

Bradley,

I assume this would only be desirable if reading input from stdin?
After all, in other cases, you already have the JSON data in your
program.

It'd be easy enough to add this into YAJL, though I'd add it as an
optional parameter rather than create a new subprocedure.

What should happen if the file already exists? Replace it or append to
it? The former would be better if you plan to process it later as a
json document, but the latter would be better if this is just intended
as a "log" (informational) type file and you don't plan to ever use it
directly.

-SK




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.