Standard Syntax:
     <%@ taglib prefix="json" uri="http://www.atg.com/taglibs/json" %>

XML Syntax:
     <anyxmlelement xmlns:json="http://www.atg.com/taglibs/json" />

JSON (JavaScript Object Notation) rendering taglib

Tag Library Information
Display NameNone
Short Namejson

Tag Summary
objectCreates a JSON Object. JSON Objects should in turn contain nested json:object, json:property and json:array tags to define the values contained therein. Objects can be nested as many times as you want.
propertyRepresents a single property of a JSON object. This tag should be contained within a json:object or json:array tag. It will render a single name/value pair for the name and value specified. The value may be specified using either the value attribute, or it may be contained within the body of the tag. If using the body of the tag, then the content is assumed to be a String. If using the value attribute, the type can be any of String, Boolean, Integer, Long, Double or Object. Boolean types will be converted to a Javascript boolean value. Integer/Long/Double types will be converted to a Javascript numeric value. Strings and Objects will be converted to Javascript string values (using toString) All String data will have all whitespace trimmed from the beginning and end of the string before being set on the JSON Object. This behavior may be overridden by setting trim=false.
arrayCreates a JSON array which consist of Strings, numeric values, booleans, JSON objects, or further JSON arrays. You can pass a List of values using the 'items' attribute. This list will be iterated over, and each value in the list will be added to the JSON Array. If you specify a body for the tag, then the value of each element in the 'items' list will be set to the variabled as named by the 'var' attribute. The body will be rendered for every item in the list. You may also omit the 'items' collection, and add elements directly to the JSON array within the body of the tag. Each json:property, json:object and json:array encountered within the body of the tag will be added to the JSON array sequentially.

Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-3 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.