Product Information > JADE Developer’s Reference > Chapter 11 - Building Web Services Applications > Parsing JSON Text

Parsing JSON Text

Standard JSON syntax can include the type of the objects to create; for example:

/> "__type":"Customer", in Microsoft JSON format
/> "$type":"Customer", in NewtonSoft (JSONN) format

This "__type" special type tag must appear as the first entry following the { or [ symbol that begins the object contents description in Microsoft format. In NewtonSoft, the "$type" tag can appear after the object reference tag; for example:

"id":"12", "$type::"Customer",

In NewtonSoft, the type can also include a namespace such as "MyNameSpace.Customer", which JADE will ignore.

If the JSON does not include the type tag, the type of the object is assumed to be the implied type of the expected object; for example, the type of the method parameter to be populated or the type of the property reference.

If the JSON includes the type tag, the type must be the implied type or a subclass of the implied type. If it is not, an exception is generated.