BBJSP JSON:Boolean Tag (Deprecated)

The BBJSP system is deprecated. For new development, use BBxServlet.

Description

In BBj 17.0 and higher, the boolean tag can be used within a BBJSP Page to create a boolean attribute within an <JSON.Object>.

Attributes

Attribute Name

Description

Required

Expression

Data Type

name

Identifies this <JSON.Boolean> within a JSON Object.

true

true

String

value

the value attribute will be evaluated to generate a boolean property in the JSON <JSON.Object>

true

true

Object

Remarks

The JSON Tag Library needs to be referenced in the BBJSP Page

Example

<%@ taglib uri='/WEB-CFG/tld/core.tld' prefix='c' %>
<%@ taglib uri='/WEB-CFG/tld/json.tld' prefix='json' %>
<% 
num = 123.45
num2 = 999.99 
%>
<c:set var='X' value='123.45'/>
<c:set var='Y' value='987.654'/>
<json:vector>
<json:object>
<json:string name='str' value='Wibble' />
<json:integer name='int' value='<%= num %>' />
<json:float name='float' value='${X}' />
<json:boolean name='bool' value='false' />
<json:object name='wibble'>
<json:string name='str' value='A String' />
<json:boolean name='bool2' value='false' />
</json:object>
</json:object>
<json:string name='str' value='XXXXXXXXX' />
<json:boolean name='bool' value='0' />
<json:integer name='int' value='${Y}' />
<json:float name='float' value='${Y}' />
<json:float name='float' value='${X * Y}' />
</json:vector>

See Also

BBJSP

JSON Tag Library