BBjspObjectSerializer::decodeObject (Deprecated)

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

Description

In BBj 16.0 and higher, this method decodes an object from a Base-64 encoded string.

Syntax

Return Value

Method

Object

decodeObject(string base64)

Parameters

Variable

Description

base64

a string containing a base-64 encoded object

Return Value

the object.

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)