EBIFour.com > Training > Clarify QRGs > JSON Ruleset-Schema mapping for Data Arrays

JSON Ruleset-Schema mapping for Data Arrays

6th October 2020

Cleo Clarify JSON ruleset screenshot

In out Cleo Clarify version 2 ruleset, we are attempting our first JSON to database mapping.

One the of the Clarify ruleset mapping issues is where we need to map the first set of data.  “20200921”,3.257

This data set needs to be place into the List<String> data array


Review of JSON Schema

In the Cleo Clarify JSON schema, create a new Element called “Data” and add a price and datetime in it:

Cleo Clarify JSON schema screenshot


Go down into “series” and find the old “data” array. Make its “Type Information” the new “Data” element you just made:

Cleo Clarify JSON schema properties screenshot


Review of JSON Data

In addition to updating the Cleo Clarify JSON Schema we also need to update the raw JSON data.

To identify the fields in the array we will need to add labels to the elements.Also, the brackets will need to be be replaced with braces. Corrected data:

“data”:[

{
“DateTime”: “20200921”,
“price”: “3.257”
}


By: on