BBjspObjectSerializer::isSerializable (Deprecated)

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

Description

In BBj 16.0 and higher, this method returns a boolean value indicating if the supplied object can be serialized.

Syntax

Return Value

Method

boolean

isSerializable(Object object)

Parameters

Variable

Description

object

the object

Return Value

a boolean value

Remarks

None.

Example

USE java.lang.Double

declare BBjspHashMap map1!
declare BBjspHashMap map2!

rem '== The BBjspHashMap will coerce supplies data to the expected types

map1! = BBjAPI().makeBBJSP().makeBBjspHashMap()
map1!.add("DOUBLE", new Double(123.45))
map1!.add("INTEGER", new Integer(999))
map1!.add("STRING", "HELLO WORLD")
map1!.setDouble("DBL","123")
map1!.setInt("INT","123.45")

print map1!

if (BBjspObjectSerializer.isSerializable(map!)) then
    map$ = BBjspObjectSerializer.encodeObject(map1!)
    print map$
    map2! = cast(BBjspHashMap,BBjspObjectSerializer.decodeObject(map$))
endif

print map2!

See Also

BBjspHashMap (Deprecated)