BBjspObjectSerializer::isSerializable


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 BBjHashMap map1!
declare BBjHashMap map2!

REM == The BBjHashMap will coerce supplies data to the expected types

map1! = new BBjHashMap()
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(BBjHashMap,BBjspObjectSerializer.decodeObject(map$))
endif

print map2!

See Also