Skip to main content

Hi,

We have implemented various custom projections and have a customer requirement to store the request and response payloads into a custom log table. Some payloads can be quite large so we have set these table fields to be of CLOB type.

Is there an easy way to convert the request and response payloads (which are of pl/sql record type) into a JSON CLOB format? Currently the only way we know of is to create the JSON from scratch using the values retrieved from the payloads. Is there some sort of utility, package or some other method that can be used to easily do the conversion?

Thanks!

Hi @mtoca 

When you are defining the structures in your projection, add ReadAndWrapWithJson property as mentioned here

Index - Technical Documentation For IFS Cloud

structure Expose using MyEntity {
nestedwithcrud = ReadAndWrapWithJson, ReadAndWrapWithXml, Create;
}

Then code generator will add the methods to convert to Json/XML

I have not used these myself for your kind of a requirement but I see the generated methods in my code ;)

 

 

It inputs the PLSQL array and outputs Json_Object_T

I’m entirely not sure how these methods are used by the framework  but I hope you can use them for your need.

 

Hope it helps!

Damith


@dsj You are a savior. This works! Thanks so much!


@dsj Thanks Damit… You are really a IFS super hero 😎


Reply