3 13 JSON Support

LANSA WAM

3.13 JSON Support

How to use JSON in WAMs

WAMs supports Javascript Object Notation (JSON) in two ways:

    Posting JSON data

     Refer to JSON Convenience Wrapper for details on how to post fields and lists using JSON.

    JSON Response Webroutines

     The webroutine's web maps (fields and lists) is sent as a JSON response with MIME type application/json and encoded in UTF‑8. You can use these webroutines to send responses to Ajax requests.

Some of the weblets shipped by LANSA use JSON response webroutines to update data using Ajax requests.

To make it easier for you to use JSON response webroutines, convenience functions are shipped in JavaScript file std_json.js. To include this JavaScript file in your weblets or webroutines, add the shipped external resources XWJJQ (jQuery Core) and XWJ003 (LANSA JSON Library).

This file defines JSON convenience wrapper objects that let you access a JSON response webroutine fields, lists and context information. See JSON Convenience Wrapper for details.

Also see

JSON Lists