Qlik Community

QlikView Documents

Documents for QlikView related information.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.

Encoding and Decoding JSON Content

Not applicable

Encoding and Decoding JSON Content

Expressor includes a datascript module that provides for encoding and decoding of JSON (JavaScript Object Notation) content.  Your Expressor Datascript coding can use this functionality in two ways:

  1. To read or write JSON content.
  2. To pass Datascript tables between operators as a string type.

To use this module, include the appropriate require statement in your code.

require 'json'

To convert a Datascript table into a JSON content (which is a string), use the json.encode function and to convert JSON content into a Datascript table, use the json.decode function. 

A Datascript table encoded into JSON content may use numeric, string or a combination of numeric and string indexes.  Unless you are certain that the Datascript table produced from JSON content will use only numeric indexes, use the pairs function to iterate through the table.

Version history
Revision #:
1 of 1
Last update:
‎05-07-2013 10:30 AM
Updated by: