Search found 4 matches

by litu23
Wed Feb 16, 2022 12:46 pm
Forum: YAJL-ILE
Topic: Remove unwanted \ and \n in the JSON
Replies: 7
Views: 3428

Re: Remove unwanted \ and \n in the JSON

Hi Scott, As per your instruction I am trying to add yajl_addPreformattedPtr() in the code but getting compilation error like '*RNF7030 30 002600 The name or indicator YAJL_AD... is not defined. ' Please find the code below and let me know, If I am missing anything: Ctl-Opt BndDir('YAJL/YAJL') AlwNu...
by litu23
Tue Feb 15, 2022 3:21 pm
Forum: YAJL-ILE
Topic: Remove unwanted \ and \n in the JSON
Replies: 7
Views: 3428

Re: Remove unwanted \ and \n in the JSON

On yajl_genOpen that first parameter is whether or not to make the JSON "pretty". If you pass *OFF instead of *ON it will drop all the line feeds (\n) from the string. --- I have tried with *OFF in that scenario also I am getting these additional '\'. You don't show how you added "OUT...
by litu23
Tue Feb 15, 2022 9:05 am
Forum: YAJL-ILE
Topic: Remove unwanted \ and \n in the JSON
Replies: 7
Views: 3428

Re: Remove unwanted \ and \n in the JSON

This is my code where I have started creating the JSON in RPGLE Dcl-S rc Int(10); Dcl-S len Int(10); Dcl-S Out_Json Char(16000000); yajl_genOpen(*ON); yajl_beginObj(); yajl_addChar('APInvoices'); yajl_beginArray(); yajl_beginObj(); yajl_addNum('runID':%Trim(%char(Runid))); yajl_addChar('loadGroup' :...
by litu23
Mon Feb 14, 2022 3:17 pm
Forum: YAJL-ILE
Topic: Remove unwanted \ and \n in the JSON
Replies: 7
Views: 3428

Remove unwanted \ and \n in the JSON

Hi Team, I am using YAJL to generate JSON in my RPG program. But the output string is containing information like below: "OUT_JSON": "{\n \"APInvoices\": [\n {\n \"runID\": What I am missing and how I can remove these additional elements (\ and \n) from my JSON. Th...