8.7

Table Of Contents
Note
The Metadata option requires that entries in the metadata have matching field
names in the data model of the template. When they have, the values are passed to
the template and the personalization scripts of the template will have access to the
values through the record's data fields. (See the Designer help: Adding Variable
Data).
Using JSON
In web environments, it is common to send and retrieve data from a server using an AJAX
request (typically invoked from within a JavaScript). Then the data is often exchanged in JSON
format. JSON is short for JavaScript Object Notation. It is a way to store information in a
structured and easy to read format. It is often referred to as XML without nodes and meant for
exchanging data.
Refer to the following online resources for more information on JSON:
l www.json.org
l www.w3schools.com
JSON string samples
The following JSON string samples show various techniques to incorporate data in a JSON
string.
A simple JSON structure holding the first and last name of a person:
{
"first": "Peter",
"last": "Parker"
}
A JSON string with references to local variables and Job Info 2:
{
"first":"%{first}",
"last":"%{last}",
"email":"%2"
}
Page 545