PI WEB API Json format response

Discussion created by GuillaumeC on Jul 31, 2020

Hi all,


We are doing a GET method from SAP via PI Web API. We got this response:

{"Timestamp":"2020-07-18T06:17:13.9790039Z","Value":"coucou test matthieu","UnitsAbbreviation":"","Good":true,"Questionable":false,"Substituted":false}

When we try to deserialize with abap,

lr_json_deserializer->deserialize EXPORTING json json_response IMPORTING abap abap_response )

We have an error message. This error is corresponding to the format of the JSON response. When we remove quotes around field names and put quotes around YES/NO value the deserialize abap function works.

{Timestamp:"2020-07-18T06:17:13.9790039Z",Value:"coucou test matthieu",UnitsAbbreviation:"",Good:"true",Questionable:"false",Substituted:" "}

Do you know if there is a way in OSI-PI to format the JSON response in order to have the abap function works?

Many thanks,

Guillaume Cobut