cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CPI JSON to XML conversion: Use JsonReader.setLenient(true) to accept malformed JSON

iglmarkus
Explorer
0 Kudos
5,478

Hello Experts,

I am getting the this error using standard JSON to XML converter: Use JsonReader.setLenient(true) to accept malformed JSON.

I got the payload from HTTP get consuming 3rd party API. With a groovy script I removed already the first "[" and last "]" (as JSON to XML will fail).

Below the payload and the corresponding error message.

this part of the payload:

"Id":"579dc1e6-e983-4543-917c-f524115db14e","CountryCode":"US","Name":"United States"},{"Id":"7b218eb7-219e-46aa-a4fc-694afedb2fe0","CountryCode":"CA","Name":"Canada"},{"Id":"38a20ece-6356-4a56-919f-959a7c94e9b7",

thanks, Markus

View Entire Topic
naga33
Newcomer
0 Kudos
[
    {
        color: "red",
        value: "#f00"
    },
    {
        color: "green",
        value: "#0f0"
    },
    {
        color: "blue",
        value: "#00f"
    },
    {
        color: "cyan",
        value: "#0ff"
    },
    {
        color: "magenta",
        value: "#f0f"
    },
    {
        color: "yellow",
        value: "#ff0"
    },
    {
        color: "black",
        value: "#000"
    }
]