JSON response from an RPG program running from Web service is Generating JSON strings with embedded quotes (\"),
Quote from Angel Bermudez on June 12, 2026, 4:02 pmwhile using YAJL -- Latest version.
JSON response from an RPG program running from Web service is Generating JSON strings with embedded quotes (\").
When viewed by SOAPUI looks like this:
{"PJSON_PAYLOAD": "{\"policyNumber\":9,\"recordCount\":0,\"success\":\"false\",\"message\":\"Invalid Call ID: 9\",\"batch_TimeStamp\":\"2026-06-12-17.46.08.515175\"}"}
During the debug session I look out the output and it looks like this:
{"PJSON_PAYLOAD": "{"policyNumber":9,"recordCount":0,"success":"false","message":"Invalid Call ID: 9","batch_TimeStamp":"2026-06-12-17.46.08.515175"}"}
Is there a web server option that I am not configuring correctly?
Thanks in advance
Angel
while using YAJL -- Latest version.
JSON response from an RPG program running from Web service is Generating JSON strings with embedded quotes (\").
When viewed by SOAPUI looks like this:
{"PJSON_PAYLOAD": "{\"policyNumber\":9,\"recordCount\":0,\"success\":\"false\",\"message\":\"Invalid Call ID: 9\",\"batch_TimeStamp\":\"2026-06-12-17.46.08.515175\"}"}
During the debug session I look out the output and it looks like this:
{"PJSON_PAYLOAD": "{"policyNumber":9,"recordCount":0,"success":"false","message":"Invalid Call ID: 9","batch_TimeStamp":"2026-06-12-17.46.08.515175"}"}
Is there a web server option that I am not configuring correctly?
Thanks in advance
Angel
Quote from NickLitten on June 22, 2026, 11:28 amShort answer: no, this isn’t a web server config issue. It’s a classic double‑encoding / nested JSON string problem coming from your RPG code.
I've seen this when the values are not double quoted:
in RPG you might have payload = '{"policyNumber":9,"success":"false"}';
so the service builds { "PJSON_PAYLOAD": payload }
which becomes { "PJSON_PAYLOAD": "{\"policyNumber\":9,...}" }
Can you share the RPG line that is creating that payload? Or are you reading from IFS? Or is it dynamic from the webserver?
Short answer: no, this isn’t a web server config issue. It’s a classic double‑encoding / nested JSON string problem coming from your RPG code.
I've seen this when the values are not double quoted:
in RPG you might have payload = '{"policyNumber":9,"success":"false"}';
so the service builds { "PJSON_PAYLOAD": payload }
which becomes { "PJSON_PAYLOAD": "{\"policyNumber\":9,...}" }
Can you share the RPG line that is creating that payload? Or are you reading from IFS? Or is it dynamic from the webserver?
