Codeunit "JSON Management"

ID 5459
Namespace: System.Text

Methods

InitializeCollection

procedure InitializeCollection(JSONString: Text)

Parameters

Name Type Description
JSONString Text

InitializeEmptyCollection

procedure InitializeEmptyCollection()

InitializeObject

procedure InitializeObject(JSONString: Text)

Parameters

Name Type Description
JSONString Text

InitializeEmptyObject

procedure InitializeEmptyObject()

InitializeFromString

procedure InitializeFromString(JSONString: Text): Boolean

Parameters

Name Type Description
JSONString Text

Returns

Type Description
Boolean

GetObjectFromCollectionByIndex

procedure GetObjectFromCollectionByIndex(var Object: Text, Index: Integer): Boolean

Parameters

Name Type Description
Object Text
Index Integer

Returns

Type Description
Boolean

GetJObjectFromCollectionByIndex

procedure GetJObjectFromCollectionByIndex(JObject: __MissingTypeSymbol__, Index: Integer): Boolean

Parameters

Name Type Description
JObject __MissingTypeSymbol__
Index Integer

Returns

Type Description
Boolean

GetPropertyValueByName

procedure GetPropertyValueByName(propertyName: Text, var value: Variant): Boolean

Parameters

Name Type Description
propertyName Text
value Variant

Returns

Type Description
Boolean

GetPropertyValueFromJObjectByPath

procedure GetPropertyValueFromJObjectByPath(JObject: __MissingTypeSymbol__, fullyQualifiedPropertyName: Text, var value: Variant): Boolean

Parameters

Name Type Description
JObject __MissingTypeSymbol__
fullyQualifiedPropertyName Text
value Variant

Returns

Type Description
Boolean

GetStringPropertyValueByName

procedure GetStringPropertyValueByName(propertyName: Text, var value: Text): Boolean

Parameters

Name Type Description
propertyName Text
value Text

Returns

Type Description
Boolean

GetArrayPropertyValueAsStringByName

procedure GetArrayPropertyValueAsStringByName(propertyName: Text, var value: Text): Boolean

Parameters

Name Type Description
propertyName Text
value Text

Returns

Type Description
Boolean

GetCollectionCount

procedure GetCollectionCount(): Integer

Returns

Type Description
Integer

WriteCollectionToString

procedure WriteCollectionToString(): Text

Returns

Type Description
Text

WriteObjectToString

procedure WriteObjectToString(): Text

Returns

Type Description
Text

FormatDecimalToJSONProperty

procedure FormatDecimalToJSONProperty(Value: Decimal, PropertyName: Text): Text

Parameters

Name Type Description
Value Decimal
PropertyName Text

Returns

Type Description
Text

XMLTextToJSONText

procedure XMLTextToJSONText(Xml: Text): Text

Parameters

Name Type Description
Xml Text

Returns

Type Description
Text

JSONTextToXMLText

procedure JSONTextToXMLText(Json: Text, DocumentElementName: Text): Text

Parameters

Name Type Description
Json Text
DocumentElementName Text

Returns

Type Description
Text

SetValue

procedure SetValue(Path: Text, Value: Variant)

Parameters

Name Type Description
Path Text
Value Variant

GetValue

procedure GetValue(Path: Text): Text

Parameters

Name Type Description
Path Text

Returns

Type Description
Text

GetValueAndSetToRecFieldNo

procedure GetValueAndSetToRecFieldNo(RecordRef: RecordRef, PropertyPath: Text, FieldNo: Integer): Boolean

Parameters

Name Type Description
RecordRef RecordRef
PropertyPath Text
FieldNo Integer

Returns

Type Description
Boolean

HasValue

procedure HasValue(Name: Text, Value: Text): Boolean

Parameters

Name Type Description
Name Text
Value Text

Returns

Type Description
Boolean

AddArrayValue

procedure AddArrayValue(Value: Variant)

Parameters

Name Type Description
Value Variant

AddJson

procedure AddJson(Path: Text, JsonString: Text)

Parameters

Name Type Description
Path Text
JsonString Text

AddJsonArray

procedure AddJsonArray(Path: Text, JsonArrayString: Text)

Parameters

Name Type Description
Path Text
JsonArrayString Text

SelectTokenFromRoot

procedure SelectTokenFromRoot(Path: Text): Boolean

Parameters

Name Type Description
Path Text

Returns

Type Description
Boolean

ReadProperties

procedure ReadProperties(): Boolean

Returns

Type Description
Boolean

GetNextProperty

procedure GetNextProperty(var Name: Text, var Value: Text): Boolean

Parameters

Name Type Description
Name Text
Value Text

Returns

Type Description
Boolean

SelectItemFromRoot

procedure SelectItemFromRoot(Path: Text, Index: Integer): Boolean

Parameters

Name Type Description
Path Text
Index Integer

Returns

Type Description
Boolean

GetCount

procedure GetCount(): Integer

Returns

Type Description
Integer

SetJsonWebResponseError

procedure SetJsonWebResponseError(var JsonString: Text, code: Text, name: Text, description: Text)

Parameters

Name Type Description
JsonString Text
code Text
name Text
description Text

GetJsonWebResponseError

procedure GetJsonWebResponseError(JsonString: Text, var code: Text, var name: Text, var description: Text): Boolean

Parameters

Name Type Description
JsonString Text
code Text
name Text
description Text

Returns

Type Description
Boolean

See also