public abstract class JsonConstruct extends BaseObject
Modifier and Type | Class and Description |
---|---|
protected static class |
JsonConstruct.ObjectBuilder
Json structure callback for building the json objects.
|
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
log
Logger
|
Constructor and Description |
---|
JsonConstruct() |
Modifier and Type | Method and Description |
---|---|
void |
__json_objectmodel_JsonConstruct_constructor__()
Method to duplicate the default constructor.
|
void |
__json_objectmodel_JsonConstruct_execute__()
Default external procedure method which exists to ensure that any
long lived resources can be initialized properly.
|
abstract void |
addElement(java.lang.String name,
java.lang.Boolean value)
Adds a json element (object property or array element) to the json object.
|
abstract void |
addElement(java.lang.String name,
java.lang.Number value)
Adds a json element (object property or array element) to the json object.
|
abstract void |
addElement(java.lang.String name,
object<? extends JsonConstruct> value)
Adds a json element (object property or array element) to the json object.
|
abstract void |
addElement(java.lang.String name,
java.lang.String value)
Adds a json element (object property or array element) to the json object.
|
abstract void |
addElementNull(java.lang.String name)
Adds null json element (object property or array element) to the json object.
|
protected longchar |
getJsonText(JsonConstruct jsonConstruct)
Serializes a JsonConstruct instance into longchar.
|
protected longchar |
getJsonText(java.lang.Object o) |
protected void |
getJsonTextImpl(JsonConstruct jsonConstruct)
The method implements
GetJsonText legacy methods on JsonObject and JsonArray
legacy classes. |
protected void |
throwStreamNotFound(java.lang.String streamName)
Throw stream not found exception.
|
logical |
write(character target)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
write(character target,
logical _fmtted)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
write(character _target,
logical _fmtted,
character _enc)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
write(handle strHndl)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
write(handle strHndl,
logical fmtted)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
write(handle _strHndl,
logical _fmtted,
character _enc)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
write(longchar target)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
write(longchar target,
logical fmtted)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
write(longchar _target,
logical _fmtted,
character _enc)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
write(memptr _target)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
write(memptr _target,
logical _fmtted)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
write(memptr _target,
logical _fmtted,
character _enc)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
writeFile(character _fname)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
writeFile(character _fname,
logical _fmtted)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
writeFile(character _fname,
logical _fmtted,
character _enc)
Writes the object graph referenced by this JSON construct into the given target.
|
protected java.nio.charset.Charset |
writeImpl(java.io.OutputStream out,
logical fmted,
character enc)
Serializes this json object or array and recursively all the child objects into byte array.
|
logical |
writeStream(character _sname)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
writeStream(character _sname,
logical _fmtted)
Writes the object graph referenced by this JSON construct into the given target.
|
logical |
writeStream(character _sname,
logical _fmtted,
character _enc)
Writes the object graph referenced by this JSON construct into the given target.
|
__lang_BaseObject_constructor__, __lang_BaseObject_execute__, assertNotNull, assertNotNull, clone, getLegacyClass, getNextSibling, getPrevSibling, legacyEquals, toLegacyString
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isTracked
public void __json_objectmodel_JsonConstruct_execute__()
public void __json_objectmodel_JsonConstruct_constructor__()
The original 4GL version had a private access mode.
Some Progress builtin classes have all constructors with private access mode but are subclassed. Since child classes must be able to reference at least one "constructor" directly, this should be impossible. This must be some kind of special case hidden inside the OO4GL implmentation. In Java the method must be public.
public logical write(handle strHndl)
strHndl
- The stream handle to use as a target.true
if the serialization was successful.public logical write(handle strHndl, logical fmtted)
strHndl
- The stream handle to use as a target.fmtted
- true
to format with extra whitespace.true
if the serialization was successful.public logical write(handle _strHndl, logical _fmtted, character _enc)
_strHndl
- The stream handle to use as a target._fmtted
- true
to format with extra whitespace._enc
- The encoding name to use or "" for the default "UTF-8".true
if the serialization was successful.public logical write(longchar target)
target
- The longchar instance to use as a target.true
if the serialization was successful.public logical write(longchar target, logical fmtted)
target
- The longchar instance to use as a target.fmtted
- true
to format with extra whitespace.true
if the serialization was successful.public logical write(longchar _target, logical _fmtted, character _enc)
_target
- The longchar instance to use as a target._fmtted
- true
to format with extra whitespace._enc
- The encoding name to use or "" for the default "UTF-8".true
if the serialization was successful.public logical write(memptr _target)
_target
- The memptr instance to use as a target.true
if the serialization was successful.public logical write(memptr _target, logical _fmtted)
_target
- The memptr instance to use as a target._fmtted
- true
to format with extra whitespace.true
if the serialization was successful.public logical write(memptr _target, logical _fmtted, character _enc)
_target
- The memptr instance to use as a target._fmtted
- true
to format with extra whitespace._enc
- The encoding name to use or "" for the default "UTF-8".true
if the serialization was successful.public logical write(character target)
target
- The character instance to use as a target.true
if the serialization was successful.public logical write(character target, logical _fmtted)
target
- The character instance to use as a target._fmtted
- true
to format with extra whitespace.true
if the serialization was successful.public logical write(character _target, logical _fmtted, character _enc)
_target
- The character instance to use as a target._fmtted
- true
to format with extra whitespace._enc
- The encoding name to use or "" for the default "UTF-8".true
if the serialization was successful.public logical writeFile(character _fname)
_fname
- The filename to use as a target.true
if the serialization was successful.public logical writeFile(character _fname, logical _fmtted)
_fname
- The filename to use as a target._fmtted
- true
to format with extra whitespace.true
if the serialization was successful.public logical writeFile(character _fname, logical _fmtted, character _enc)
_fname
- The filename to use as a target._fmtted
- true
to format with extra whitespace._enc
- The encoding name to use or "" for the default "UTF-8".true
if the serialization was successful.public logical writeStream(character _sname)
_sname
- The stream name to use as a target.true
if the serialization was successful.public logical writeStream(character _sname, logical _fmtted)
_sname
- The stream name to use as a target._fmtted
- true
to format with extra whitespace.true
if the serialization was successful.public logical writeStream(character _sname, logical _fmtted, character _enc)
_sname
- The stream name to use as a target._fmtted
- true
to format with extra whitespace._enc
- The encoding name to use or "" for the default "UTF-8".true
if the serialization was successful.protected void throwStreamNotFound(java.lang.String streamName)
streamName
- The stream name.public abstract void addElement(java.lang.String name, object<? extends JsonConstruct> value)
name
- Name of the json element. This parameter is ignored if this is a json array.value
- Value of the json element.public abstract void addElement(java.lang.String name, java.lang.String value)
name
- Name of the json element. This parameter is ignored if this is a json array.value
- Value of the json element.public abstract void addElement(java.lang.String name, java.lang.Number value)
name
- Name of the json element. This parameter is ignored if this is a json array.value
- Value of the json element.public abstract void addElement(java.lang.String name, java.lang.Boolean value)
name
- Name of the json element. This parameter is ignored if this is a json array.value
- Value of the json element.public abstract void addElementNull(java.lang.String name)
name
- Name of the json element. This parameter is ignored if this is a json array.protected java.nio.charset.Charset writeImpl(java.io.OutputStream out, logical fmted, character enc) throws java.lang.Exception
converter
together with the Java character encoding resolved
from the legacy character encoding.out
- Target output stream.fmted
- When set to true
the serialized json text will be formatted.enc
- The legacy encoding name to be used during serialization.java.lang.Exception
- in case of an IO error.protected void getJsonTextImpl(JsonConstruct jsonConstruct)
GetJsonText
legacy methods on JsonObject
and JsonArray
legacy classes.jsonConstruct
- The JsonConstruct instance to serialize.protected longchar getJsonText(JsonConstruct jsonConstruct) throws java.io.IOException
jsonConstruct
- The instance to serialize.java.io.IOException
- raised when there is an IO error during the serialization.protected longchar getJsonText(java.lang.Object o) throws java.io.IOException
java.io.IOException