RSJSON Formatter mappings

JSON to RSJSON conversion mappings

The RSJSON Formatter Snap uses the following mappings to format the entity information in simplified JSON format to RSJSON format.

Attribute type Upstream Mapper Mapping Formatted RSJSON element
Simple attribute
attributes.thgdescription
Or
attributes.thgdescription.value
"thgdescription": {
"values": [{
"value": true,
"locale": "en-US",
"source": "internal"}]
}
Localized attributes
$attributes.thgcolor["fr-FR"].value
Or
attributes.thgcolor.fr-FR.value
Or
$attributes.thgcolor.value.fr-FR
"thgcolor": {
"values": [{
"value": "red",
"locale": "fr-FR",
"source": "internal"
}]
}
Collection attributes
$attributes.sustainabilitytaxclassification[0]
$attributes.sustainabilitytaxclassification[1]
Or
attributes.thgdescription.value[0]
attributes.thgdescription.value[1]
"sustainabilitytaxclassification": {
"values": [{
"value": "test",
"locale": "en-US", 
"source": "internal"
},
{
"value": "test2",
"locale": "en-US",
"source": "internal"
}]
}						
Localized and collection attributes
attributes.thgcolor[“fr-FR”][0]
attributes.thgcolor[“fr-FR”][1]
Or
$attributes.thgcolor.fr-FR[0]
$attributes.thgcolor.fr-FR[1]
Or
$attributes.thgcolor.value.fr-FR[0]
$attributes.thgcolor.value.fr-FR[1]
Or
$attributes.thgcolor.value["fr-FR"][0]
$attributes.thgcolor.value["fr-FR"][1]
"thgcolor": {
"values": [{
"value": "red",
"locale": "en-US",
"source": "internal"
},
{
"value": "orange",
"locale": "fr-FR",
"source": "internal"
},
{
"value": "black",
"locale": "fr-FR",
"source": "internal"
}
]
},
Nested attributes
attributes.contacttype.value[0].contactname
attributes.contacttype.value[1].contactname
Or
attributes.contacttype[0].contactname
attributes.contacttype[1].contactname
						
"contacttype": {
"group": [{
"locale": "en-US",
"source": "internal",
"contactname": {
"values": [{
"value": "name",
"locale": "en-US",
"source": "internal"
}]
}
}]
}
Nested localizable attributes (Follow similar pattern for deeply nested)
attributes.contacttype.value.fr-FR[0].contactname
Attributes.contacttype.value.en-US[0].contactname
							
"contacttype": {
"group": [{
"locale": "fr-FR",
"source": "internal",
"contactname": {
"values": [{
"value": "name",
"locale": "fr-FR",
"source": "internal"
}]
}
}]
}							
Context attribute
$contexts['refcountrylist-India'].attributes.active
						
"contexts": [{
"context": {
"refcountrylist":"India"
},
"attributes": {
"active": {
"values": [
"value": false,
"locale": "en-US",
"source": "internal"
  }]
 }
}
}]