Built-in support for JSON in Web Methods

Morfik has replaced data exchange using XML in web methods with JSON support. JSON object representations as strings are usually shorter in length, less complex and easier to inspect visually than XML. The use of JSON should speed the transfer of large data sets from the server to forms and back.

A sample JSON object is shown in figure 1 below. JSON data representation is done using name-value pairs where the value part of a pair can be either a simple string or another JSON object.

The conversion to and from JSON objects and strings is handled automatically in web methods just as the conversions in XML were. To the developer the only obvious difference should be the transfer speed of the data.

For a more complete discussion of JSON in Morfik, refer to Using JSON.

{
    "firstName": "Wendy",
    "lastName": "Wickermann",
    "address": {
        "city": "San Francisco",
        "state":"CA",
        "zip": 94121,
        "street": "444 Columbus Ave"
    },
    "email": [
        "WendyW@sf.com",
        "wwickermann12@myspace.com"
       ]
}


Figure 1 JSON Data Object

Related Topics


Back to top