%JSON.Formatter
class %JSON.Formatter extends %Library.RegisteredObject
%JSON.Formatter implements the ability to format JSON documents which are expressed as strings, text or dynamic objects.Property Inventory
Method Inventory
Properties
property Indent as %Boolean [ InitialExpression = 1 ];
Indent specifies that indentation of the JSON output should take place.
Property methods: IndentDisplayToLogical(), IndentGet(), IndentIsValid(), IndentLogicalToDisplay(), IndentNormalize(), IndentSet()
property IndentChars as %String [ InitialExpression = "  " ];
IndentChars specifies the character sequence to be used for each indent level if Indent=1.
Property methods: IndentCharsDisplayToLogical(), IndentCharsGet(), IndentCharsIsValid(), IndentCharsLogicalToDisplay(), IndentCharsLogicalToOdbc(), IndentCharsNormalize(), IndentCharsSet()
property LineTerminator as %String [ InitialExpression = $char(13,10) ];
LineTerminator specifies the character sequence to terminate each line when indenting.
Property methods: LineTerminatorDisplayToLogical(), LineTerminatorGet(), LineTerminatorIsValid(), LineTerminatorLogicalToDisplay(), LineTerminatorLogicalToOdbc(), LineTerminatorNormalize(), LineTerminatorSet()
Methods
method Format(input) as %Status
Format a JSON document using the specified indentation and write it to the current device.
The input argument is either JSON as a string or stream, or a subclass of %DynamicAbstractObject.
The input argument is either JSON as a string or stream, or a subclass of %DynamicAbstractObject.
method FormatToStream(input, ByRef export As %Stream.Object) as %Status
Format a JSON document using the specified indentation and write it to a stream.
The input argument is either JSON as a string or stream, or a subclass of %DynamicAbstractObject.
The input argument is either JSON as a string or stream, or a subclass of %DynamicAbstractObject.
Format a JSON document using the specified indentation and write it to a string.
Serialize a JSON enabled class as a JSON document and return it as a string.
Serialize a JSON enabled class as a JSON document and return it as a string.
Inherited Members
Inherited Methods
- %AddToSaveSet()
 - %ClassIsLatestVersion()
 - %ClassName()
 - %ConstructClone()
 - %DispatchClassMethod()
 - %DispatchGetModified()
 - %DispatchGetProperty()
 - %DispatchMethod()
 - %DispatchSetModified()
 - %DispatchSetMultidimProperty()
 - %DispatchSetProperty()
 - %Extends()
 - %GetParameter()
 - %IsA()
 - %IsModified()
 - %New()
 - %NormalizeObject()
 - %ObjectModified()
 - %OriginalNamespace()
 - %PackageName()
 - %RemoveFromSaveSet()
 - %SerializeObject()
 - %SetModified()
 - %ValidateObject()