Search found 3 matches

by fauzyd2
Tue Jan 16, 2024 1:51 am
Forum: YAJL-ILE
Topic: What's the best way to log JSON request and response?
Replies: 4
Views: 23745

Re: What's the best way to log JSON request and response?

Thanks for your advice, Scott!

Yes, now my code is much faster than before :D
by fauzyd2
Sun Jan 14, 2024 12:57 pm
Forum: YAJL-ILE
Topic: What's the best way to log JSON request and response?
Replies: 4
Views: 23745

Re: What's the best way to log JSON request and response?

Sorry for not clear before. I made a server using ibm http server, redirect client request with cgi to rpgle program. This server provide API for client to consume like Inquiry Account Info, etc. Code bellow is overview:


FDBALLZ IF E K Disk
FJSLOG O E K Disk
*
/include yajl_h
*
D timeStamp DS 20 ...
by fauzyd2
Sun Jan 14, 2024 10:06 am
Forum: YAJL-ILE
Topic: What's the best way to log JSON request and response?
Replies: 4
Views: 23745

What's the best way to log JSON request and response?

Hello everyone,

i used this code below to get string json request and response:


D docNode S Like(yajl_val)
D requestBody S 16100A
D responseBody S 16100A
...
docNode = yajl_stdin_load_tree(*on:error);
requestBody = yajl_StringifyStr(docNode);

yajl_genOpen(*Off);
yajl_beginObj();
...
yajl ...