Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
titleJSON Mapping with Data Types
{ "age" : "$age(type:integer)" }
  • The extended property 'type' is given along with the value 'integer'. 
  • The property and the value are separated by a colon. 
  • Note that the possible values for data type are "integer", "long", "double" and "boolean".

...

Code Block
languagejavascript
titleJSON Mapping with Required Roles
{ "salary" : "$salary(type:double;requiredRoles:hr,admin)" }
  • The 'requiredRoles' property is added along with the values 'hr' and 'admin'. 
  • Note that the two values for required roles property are separated by a comma. 
  • Also, the two extended properties are separated by a semicolon. 

...

Code Block
languagejavascript
titleJSON Mapping with Nested Queries
{
    "Offices": {
        "Office": [
            {
                "officeCode": "$officeCode(type:integer)",
                "city": "$city",
                "country": "$country",
                "phone": "$phone",
                "@employeesInOfficeSQL": "$officeCode->officeCode"
            }
        ]
    }
}

...