Top Method Summary
Options Name Purpose
AddArrayPrimitive (JsonArray, character) Adds a primitive value to a JsonArray by detecting its type Notes : @param poArray The JsonArray to add the value to @param pcValue The string representation of the value */
AddPrimitiveValue (JsonObject, character, character) Adds a primitive value to a JsonObject by detecting its type Notes : Detects null, boolean, number, and string (with unquoting) @param poObject The JsonObject to add the value to @param pcKey The property name @param pcValue The string representation of the value */
CHARACTER CanonicalDecimal (decimal) Converts a decimal to canonical string representation Notes : Strips trailing zeros from the fractional part @param pdeValue The decimal value to convert @return The canonical decimal string */
LONGCHAR Convert (JsonObject) Converts a JsonObject to TOON format Notes : @param poJson The JsonObject to convert @return The TOON representation as LONGCHAR */
CHARACTER EscapeString (character) Escapes special characters in a quoted TOON string Notes : Only the five TOON escape sequences are used @param pcValue The string to escape @return The escaped string */
INTEGER FindKeyColon (character) Finds the position of the key-terminating colon in a line Notes : Skips colons inside quoted strings and array headers @param pcLine The line to search @return The position of the colon, or 0 if not found */
CHARACTER FormatArrayNumber (JsonArray, integer) Formats a number from a JsonArray element in canonical form Notes : @param poArray The JsonArray containing the element @param piIndex The 1-based index of the element @return The canonical number string */
CHARACTER FormatArrayPrimitive (JsonArray, integer) Formats a primitive value from a JsonArray element Notes : @param poArray The JsonArray containing the element @param piIndex The 1-based index of the element @return The formatted primitive value */
CHARACTER FormatNumber (JsonObject, character) Formats a number from a JsonObject property in canonical form Notes : Removes trailing zeros, ensures no exponent notation @param poObj The JsonObject containing the property @param pcName The property name @return The canonical number string */
CHARACTER FormatPrimitive (JsonObject, character) Formats a primitive value from a JsonObject property Notes : Applies TOON quoting and number canonicalization rules @param poObj The JsonObject containing the property @param pcName The property name @return The formatted primitive value */
CHARACTER FormatString (character) Formats a string value with TOON quoting rules Notes : Quotes are added only when necessary per the spec @param pcValue The string value to format @return The formatted (possibly quoted) string */
INTEGER GetDepth (character) Calculates the indentation depth of a line Notes : @param pcLine The line to measure @return The depth (number of indent levels) */
CHARACTER Indent (integer) Returns the indentation string for the given depth Notes : Uses 2 spaces per level as the TOON default @param piDepth The indentation depth @return The indentation string */
LOGICAL IsArrayHeader (character) Checks if a key contains an array header pattern Notes : Looks for key[N] or key[N]{fields} pattern @param pcKey The key to check @return TRUE if the key is an array header */
LOGICAL IsNumericToken (character) Checks if a token represents a numeric value Notes : @param pcValue The token to check @return TRUE if the token is a valid number */
LOGICAL IsPrimitiveArray (JsonArray) Checks if all elements in an array are primitive types Notes : @param poArray The JsonArray to check @return TRUE if all elements are primitives */
LOGICAL IsTabularArray (JsonArray) Checks if an array qualifies for tabular encoding Notes : All elements must be objects with identical key sets and all values must be primitives @param poArray The JsonArray to check @return TRUE if the array can be encoded in tabular format */
LOGICAL LooksLikeNumber (character) Checks if a string looks like a numeric token Notes : Matches patterns like 123, -123, 1.5, 1e6, 05 @param pcValue The string to check @return TRUE if the string could be confused with a number */
LOGICAL NeedsQuoting (character) Determines if a string value requires quoting in TOON Notes : Checks for reserved words, special characters, numeric patterns @param pcValue The string value to check @return TRUE if the value needs quoting */
ParseArrayFromHeader (longchar, integer, integer, character, character, integer, JsonObject) Parses an array from its header line Notes : Handles inline primitive, tabular, and mixed arrays @param plcLines The full TOON content @param piTotal The total number of lines @param piDepth The current depth @param pcHeader The array header (e.g. key[3] or key[3]{f1,f2}) @param pcInlineValue The value after the colon (for inline arrays) @param piLine INPUT-OUTPUT The current line index @param poObject The parent JsonObject */
ParseArrayFromHeaderForListItem (longchar, integer, integer, character, character, integer, JsonObject) Parses an array header within a list-item object context Notes : @param plcLines The full TOON content @param piTotal The total number of lines @param piDepth The current depth @param pcHeader The array header @param pcInlineValue The inline value after the colon @param piLine INPUT-OUTPUT The current line index @param poObject The parent JsonObject */
DECIMAL ParseDecimal (character) Parses a decimal from a TOON numeric token Notes : TOON always uses period as decimal point, so we must enforce American numeric format for parsing @param pcValue The numeric token string @return The parsed decimal value */
ParseInlineValues (character, integer, JsonArray) Parses inline comma-separated values into a JsonArray Notes : @param pcValues The comma-separated values string @param piCount The declared element count @param poArray The JsonArray to populate */
ParseListItemObjectFields (longchar, integer, integer, integer, JsonObject) Parses remaining fields of a list-item object Notes : After the first field on the hyphen line, remaining fields appear at depth+1 @param plcLines The full TOON content @param piTotal The total number of lines @param piDepth The expected indentation depth for remaining fields @param piLine INPUT-OUTPUT The current line index @param poObject The object to add fields to */
ParseListItems (longchar, integer, integer, integer, integer, JsonArray) Parses list items (mixed array) from TOON lines Notes : @param plcLines The full TOON content @param piTotal The total number of lines @param piDepth The expected indentation depth for items @param piCount The declared element count @param piLine INPUT-OUTPUT The current line index @param poArray The JsonArray to populate */
ParseObject (longchar, integer, integer, integer, JsonObject) Parses object properties from TOON lines at a given depth Notes : @param plcLines The full TOON content split by LF @param piTotal The total number of lines @param piDepth The expected indentation depth @param piLine INPUT-OUTPUT The current line index @param poObject The JsonObject to populate */
ParseTabularRows (longchar, integer, integer, integer, character, integer, JsonArray) Parses tabular rows into an array of objects Notes : @param plcLines The full TOON content @param piTotal The total number of lines @param piDepth The expected indentation depth for rows @param piCount The declared row count @param pcFields Comma-separated field names @param piLine INPUT-OUTPUT The current line index @param poArray The JsonArray to populate */
Progress.Json.ObjectModel.JsonObject ToJson (longchar) Parses a TOON string and returns a JsonObject Notes : @param plcToon The TOON string to parse @return The parsed JsonObject */
CHARACTER UnquoteString (character) Removes surrounding quotes and unescapes a TOON quoted string Notes : @param pcValue The quoted string value @return The unquoted and unescaped string */
WriteArray (JsonArray, character, integer, longchar) Writes a JsonArray in TOON format Notes : Determines the appropriate encoding: inline primitive, tabular (uniform objects), or mixed list items @param poArray The JsonArray to write @param pcName The property name for the array @param piDepth The current indentation depth @param pcResult OUTPUT The accumulated TOON string */
WriteInlineArrayAsListItem (JsonArray, integer, longchar) Writes an inline array as a list item Notes : @param poArray The JsonArray to write @param piDepth The current list item depth @param pcResult OUTPUT The accumulated TOON string */
WriteInlinePrimitiveArray (JsonArray, character, integer, longchar) Writes a primitive array inline: key[N]: v1,v2,v3 Notes : @param poArray The JsonArray to write @param pcName The property name for the array @param piDepth The current indentation depth @param pcResult OUTPUT The accumulated TOON string */
WriteListItemObject (JsonObject, integer, longchar) Writes a JsonObject as a list item (with - prefix for first field) Notes : @param poObj The JsonObject to write @param piDepth The current list item depth @param pcResult OUTPUT The accumulated TOON string */
WriteMixedArray (JsonArray, character, integer, longchar) Writes a mixed array using list items Notes : @param poArray The JsonArray to write @param pcName The property name for the array @param piDepth The current indentation depth @param pcResult OUTPUT The accumulated TOON string */
WriteObject (JsonObject, integer, longchar) Writes a JsonObject's properties at the given indentation depth Notes : @param poJson The JsonObject to write @param piDepth The current indentation depth @param pcResult OUTPUT The accumulated TOON string */
WriteTabularArray (JsonArray, character, integer, longchar) Writes a tabular array of uniform objects Notes : Format: key[N]~{f1,f2,f3~}: v1,v2,v3 v4,v5,v6 @param poArray The JsonArray of uniform objects @param pcName The property name for the array @param piDepth The current indentation depth @param pcResult OUTPUT The accumulated TOON string */


Method Detail
Top

AddArrayPrimitive (JsonArray, character)

Purpose: Adds a primitive value to a JsonArray by detecting its type
Notes :

Parameters:
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray to add the value to
pcValue CHARACTER
The string representation of the value
Top

AddPrimitiveValue (JsonObject, character, character)

Purpose: Adds a primitive value to a JsonObject by detecting its type
Notes : Detects null, boolean, number, and string (with unquoting)

Parameters:
poObject Progress.Json.ObjectModel.JsonObject
The JsonObject to add the value to
pcKey CHARACTER
The property name
pcValue CHARACTER
The string representation of the value
Top

CHARACTER CanonicalDecimal (decimal)

Purpose: Converts a decimal to canonical string representation
Notes : Strips trailing zeros from the fractional part

Parameters:
pdeValue DECIMAL
The decimal value to convert
Returns CHARACTER
The canonical decimal string
Top

LONGCHAR Convert (JsonObject)

Purpose: Converts a JsonObject to TOON format
Notes :

Parameters:
poJson Progress.Json.ObjectModel.JsonObject
The JsonObject to convert
Returns LONGCHAR
The TOON representation as LONGCHAR
Top

CHARACTER EscapeString (character)

Purpose: Escapes special characters in a quoted TOON string
Notes : Only the five TOON escape sequences are used

Parameters:
pcValue CHARACTER
The string to escape
Returns CHARACTER
The escaped string
Top

INTEGER FindKeyColon (character)

Purpose: Finds the position of the key-terminating colon in a line
Notes : Skips colons inside quoted strings and array headers

Parameters:
pcLine CHARACTER
The line to search
Returns INTEGER
The position of the colon, or 0 if not found
Top

CHARACTER FormatArrayNumber (JsonArray, integer)

Purpose: Formats a number from a JsonArray element in canonical form
Notes :

Parameters:
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray containing the element
piIndex INTEGER
The 1-based index of the element
Returns CHARACTER
The canonical number string
Top

CHARACTER FormatArrayPrimitive (JsonArray, integer)

Purpose: Formats a primitive value from a JsonArray element
Notes :

Parameters:
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray containing the element
piIndex INTEGER
The 1-based index of the element
Returns CHARACTER
The formatted primitive value
Top

CHARACTER FormatNumber (JsonObject, character)

Purpose: Formats a number from a JsonObject property in canonical form
Notes : Removes trailing zeros, ensures no exponent notation

Parameters:
poObj Progress.Json.ObjectModel.JsonObject
The JsonObject containing the property
pcName CHARACTER
The property name
Returns CHARACTER
The canonical number string
Top

CHARACTER FormatPrimitive (JsonObject, character)

Purpose: Formats a primitive value from a JsonObject property
Notes : Applies TOON quoting and number canonicalization rules

Parameters:
poObj Progress.Json.ObjectModel.JsonObject
The JsonObject containing the property
pcName CHARACTER
The property name
Returns CHARACTER
The formatted primitive value
Top

CHARACTER FormatString (character)

Purpose: Formats a string value with TOON quoting rules
Notes : Quotes are added only when necessary per the spec

Parameters:
pcValue CHARACTER
The string value to format
Returns CHARACTER
The formatted (possibly quoted) string
Top

INTEGER GetDepth (character)

Purpose: Calculates the indentation depth of a line
Notes :

Parameters:
pcLine CHARACTER
The line to measure
Returns INTEGER
The depth (number of indent levels)
Top

CHARACTER Indent (integer)

Purpose: Returns the indentation string for the given depth
Notes : Uses 2 spaces per level as the TOON default

Parameters:
piDepth INTEGER
The indentation depth
Returns CHARACTER
The indentation string
Top

LOGICAL IsArrayHeader (character)

Purpose: Checks if a key contains an array header pattern
Notes : Looks for key[N] or key[N]{fields} pattern

Parameters:
pcKey CHARACTER
The key to check
Returns LOGICAL
TRUE if the key is an array header
Top

LOGICAL IsNumericToken (character)

Purpose: Checks if a token represents a numeric value
Notes :

Parameters:
pcValue CHARACTER
The token to check
Returns LOGICAL
TRUE if the token is a valid number
Top

LOGICAL IsPrimitiveArray (JsonArray)

Purpose: Checks if all elements in an array are primitive types
Notes :

Parameters:
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray to check
Returns LOGICAL
TRUE if all elements are primitives
Top

LOGICAL IsTabularArray (JsonArray)

Purpose: Checks if an array qualifies for tabular encoding
Notes : All elements must be objects with identical key sets and
all values must be primitives

Parameters:
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray to check
Returns LOGICAL
TRUE if the array can be encoded in tabular format
Top

LOGICAL LooksLikeNumber (character)

Purpose: Checks if a string looks like a numeric token
Notes : Matches patterns like 123, -123, 1.5, 1e6, 05

Parameters:
pcValue CHARACTER
The string to check
Returns LOGICAL
TRUE if the string could be confused with a number
Top

LOGICAL NeedsQuoting (character)

Purpose: Determines if a string value requires quoting in TOON
Notes : Checks for reserved words, special characters, numeric patterns

Parameters:
pcValue CHARACTER
The string value to check
Returns LOGICAL
TRUE if the value needs quoting
Top

ParseArrayFromHeader (longchar, integer, integer, character, character, integer, JsonObject)

Purpose: Parses an array from its header line
Notes : Handles inline primitive, tabular, and mixed arrays

Parameters:
plcLines LONGCHAR
The full TOON content
piTotal INTEGER
The total number of lines
piDepth INTEGER
The current depth
pcHeader CHARACTER
The array header (e.g. key[3] or key[3]{f1,f2})
pcInlineValue CHARACTER
The value after the colon (for inline arrays)
piLine INTEGER
INPUT-OUTPUT The current line index
poObject Progress.Json.ObjectModel.JsonObject
The parent JsonObject
Top

ParseArrayFromHeaderForListItem (longchar, integer, integer, character, character, integer, JsonObject)

Purpose: Parses an array header within a list-item object context
Notes :

Parameters:
plcLines LONGCHAR
The full TOON content
piTotal INTEGER
The total number of lines
piDepth INTEGER
The current depth
pcHeader CHARACTER
The array header
pcInlineValue CHARACTER
The inline value after the colon
piLine INTEGER
INPUT-OUTPUT The current line index
poObject Progress.Json.ObjectModel.JsonObject
The parent JsonObject
Top

DECIMAL ParseDecimal (character)

Purpose: Parses a decimal from a TOON numeric token
Notes : TOON always uses period as decimal point, so we must
enforce American numeric format for parsing

Parameters:
pcValue CHARACTER
The numeric token string
Returns DECIMAL
The parsed decimal value
Top

ParseInlineValues (character, integer, JsonArray)

Purpose: Parses inline comma-separated values into a JsonArray
Notes :

Parameters:
pcValues CHARACTER
The comma-separated values string
piCount INTEGER
The declared element count
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray to populate
Top

ParseListItemObjectFields (longchar, integer, integer, integer, JsonObject)

Purpose: Parses remaining fields of a list-item object
Notes : After the first field on the hyphen line, remaining fields
appear at depth+1

Parameters:
plcLines LONGCHAR
The full TOON content
piTotal INTEGER
The total number of lines
piDepth INTEGER
The expected indentation depth for remaining fields
piLine INTEGER
INPUT-OUTPUT The current line index
poObject Progress.Json.ObjectModel.JsonObject
The object to add fields to
Top

ParseListItems (longchar, integer, integer, integer, integer, JsonArray)

Purpose: Parses list items (mixed array) from TOON lines
Notes :

Parameters:
plcLines LONGCHAR
The full TOON content
piTotal INTEGER
The total number of lines
piDepth INTEGER
The expected indentation depth for items
piCount INTEGER
The declared element count
piLine INTEGER
INPUT-OUTPUT The current line index
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray to populate
Top

ParseObject (longchar, integer, integer, integer, JsonObject)

Purpose: Parses object properties from TOON lines at a given depth
Notes :

Parameters:
plcLines LONGCHAR
The full TOON content split by LF
piTotal INTEGER
The total number of lines
piDepth INTEGER
The expected indentation depth
piLine INTEGER
INPUT-OUTPUT The current line index
poObject Progress.Json.ObjectModel.JsonObject
The JsonObject to populate
Top

ParseTabularRows (longchar, integer, integer, integer, character, integer, JsonArray)

Purpose: Parses tabular rows into an array of objects
Notes :

Parameters:
plcLines LONGCHAR
The full TOON content
piTotal INTEGER
The total number of lines
piDepth INTEGER
The expected indentation depth for rows
piCount INTEGER
The declared row count
pcFields CHARACTER
Comma-separated field names
piLine INTEGER
INPUT-OUTPUT The current line index
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray to populate
Top

Progress.Json.ObjectModel.JsonObject ToJson (longchar)

Purpose: Parses a TOON string and returns a JsonObject
Notes :

Parameters:
plcToon LONGCHAR
The TOON string to parse
Returns Progress.Json.ObjectModel.JsonObject
The parsed JsonObject
Top

CHARACTER UnquoteString (character)

Purpose: Removes surrounding quotes and unescapes a TOON quoted string
Notes :

Parameters:
pcValue CHARACTER
The quoted string value
Returns CHARACTER
The unquoted and unescaped string
Top

WriteArray (JsonArray, character, integer, longchar)

Purpose: Writes a JsonArray in TOON format
Notes : Determines the appropriate encoding: inline primitive,
tabular (uniform objects), or mixed list items

Parameters:
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray to write
pcName CHARACTER
The property name for the array
piDepth INTEGER
The current indentation depth
pcResult LONGCHAR
OUTPUT The accumulated TOON string
Top

WriteInlineArrayAsListItem (JsonArray, integer, longchar)

Purpose: Writes an inline array as a list item
Notes :

Parameters:
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray to write
piDepth INTEGER
The current list item depth
pcResult LONGCHAR
OUTPUT The accumulated TOON string
Top

WriteInlinePrimitiveArray (JsonArray, character, integer, longchar)

Purpose: Writes a primitive array inline: key[N]: v1,v2,v3
Notes :

Parameters:
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray to write
pcName CHARACTER
The property name for the array
piDepth INTEGER
The current indentation depth
pcResult LONGCHAR
OUTPUT The accumulated TOON string
Top

WriteListItemObject (JsonObject, integer, longchar)

Purpose: Writes a JsonObject as a list item (with - prefix for first field)
Notes :

Parameters:
poObj Progress.Json.ObjectModel.JsonObject
The JsonObject to write
piDepth INTEGER
The current list item depth
pcResult LONGCHAR
OUTPUT The accumulated TOON string
Top

WriteMixedArray (JsonArray, character, integer, longchar)

Purpose: Writes a mixed array using list items
Notes :

Parameters:
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray to write
pcName CHARACTER
The property name for the array
piDepth INTEGER
The current indentation depth
pcResult LONGCHAR
OUTPUT The accumulated TOON string
Top

WriteObject (JsonObject, integer, longchar)

Purpose: Writes a JsonObject's properties at the given indentation depth
Notes :

Parameters:
poJson Progress.Json.ObjectModel.JsonObject
The JsonObject to write
piDepth INTEGER
The current indentation depth
pcResult LONGCHAR
OUTPUT The accumulated TOON string
Top

WriteTabularArray (JsonArray, character, integer, longchar)

Purpose: Writes a tabular array of uniform objects
Notes : Format: key[N]~{f1,f2,f3~}:
v1,v2,v3
v4,v5,v6

Parameters:
poArray Progress.Json.ObjectModel.JsonArray
The JsonArray of uniform objects
pcName CHARACTER
The property name for the array
piDepth INTEGER
The current indentation depth
pcResult LONGCHAR
OUTPUT The accumulated TOON string


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       13.04.2026 10:21:46