Codeunit 5505364 M365 Json Dictionary

Codeunit 5505364 M365 Json Dictionary

Methods

ValuesKey

procedure ValuesKey(): Text

Returns a key name used to store the values.

Parameters / Return Value

  • Returns Text

    Return value of type Text.


TypesKey

procedure TypesKey(): Text

Returns a key name used to store the data types.

Parameters / Return Value

  • Returns Text

    Return value of type Text.


GetJsonDictionary

procedure GetJsonDictionary(var returnJsonDictionary: JsonObject; var returnJsonTypeDictionary: JsonObject): Boolean

Returns the current (internal) Json Dictionary and the corresponding type Json Dictionary.

Parameters / Return Value

  • returnJsonDictionary JsonObject

    JsonObject

  • returnJsonTypeDictionary JsonObject

    JsonObject

  • Returns Boolean

    Boolean


GetJsonDictionary

procedure GetJsonDictionary(var returnJsonDictionary: JsonToken; var returnJsonTypeDictionary: JsonToken): Boolean

Returns the current (internal) Json Dictionary and the corresponding type Json Dictionary.

Parameters / Return Value

  • returnJsonDictionary JsonToken

    JsonToken

  • returnJsonTypeDictionary JsonToken

    JsonToken

  • Returns Boolean

    Boolean


GetJsonDictionary

procedure GetJsonDictionary(var returnJsonDictionary: JsonObject): Boolean

Returns the current (internal) Json Dictionary.

Parameters / Return Value

  • returnJsonDictionary JsonObject

    JsonObject

  • Returns Boolean

    Boolean


GetJsonDictionary

procedure GetJsonDictionary(var returnJsonDictionary: JsonToken): Boolean

Returns the current (internal) Json Dictionary.

Parameters / Return Value

  • returnJsonDictionary JsonToken

    JsonToken

  • Returns Boolean

    Boolean


SetJsonDictionary

procedure SetJsonDictionary(newJsonDictionary: JsonObject; newJsonTypeDictionary: JsonObject; matchTypes: Boolean)

Sets a new (internal) Json Dictionary and the corresponding type Json Dictionary.

Parameters / Return Value

  • newJsonDictionary JsonObject

    JsonObject

  • newJsonTypeDictionary JsonObject

    JsonObject

  • matchTypes Boolean

    Boolean


SetJsonDictionary

procedure SetJsonDictionary(newJsonDictionary: JsonObject)

Sets a new (internal) Json Dictionary.

Parameters / Return Value

  • newJsonDictionary JsonObject

    JsonObject


Flatten

procedure Flatten(prefix: Text; var toDict: Codeunit "M365 Json Dictionary")

Flattens the (nested) dictionary (containing other dictionaries).

Structures like Key1:Value1 Key2:Dict2 Key1:Value3 Key2:Value4 will be flattened into a simple dictionary, appening the parent key name: Key1:Value1 Key2Key1:Value3 Key2Key2:Value4

This function allows an additional prefix to be added before the name.

Parameters / Return Value

  • prefix Text

    Text

  • toDict Codeunit "M365 Json Dictionary"

    Codeunit “M365 Json Dictionary”


Flatten

procedure Flatten(var toDict: Codeunit "M365 Json Dictionary")

Flattens the (nested) dictionary (containing other dictionaries).

Structures like Key1:Value1 Key2:Dict2 Key1:Value3 Key2:Value4

will be flattened into a simple dictionary, appening the parent key name: Key1:Value1 Key2Key1:Value3 Key2Key2:Value4

Parameters / Return Value

  • toDict Codeunit "M365 Json Dictionary"

    Codeunit “M365 Json Dictionary”


Serialize

procedure Serialize(var returnToStream: OutStream; valuesOnly: Boolean): Boolean

Serialize the Json Dictionary to an OutStream.

Parameters / Return Value

  • returnToStream OutStream

    OutStream

  • valuesOnly Boolean

    Boolean

  • Returns Boolean

    Boolean


Serialize

procedure Serialize(var returnToStream: OutStream): Boolean

Serialize the Json Dictionary to an OutStream.

Parameters / Return Value

  • returnToStream OutStream

    OutStream

  • Returns Boolean

    Boolean


Serialize

procedure Serialize(var returnText: Text; valuesOnly: Boolean): Boolean

Serialize the Json Dictionary to a text.

Parameters / Return Value

  • returnText Text

    Text

  • valuesOnly Boolean

    Boolean

  • Returns Boolean

    Boolean


Serialize

procedure Serialize(var returnText: Text): Boolean

Serialize the Json Dictionary to a text.

Parameters / Return Value

  • returnText Text

    Text

  • Returns Boolean

    Boolean


Serialize

procedure Serialize(var tempBlob: Codeunit "Temp Blob"; valuesOnly: Boolean): Boolean

Serialize the Json Dictionary to a TempBlob.

Parameters / Return Value

  • tempBlob Codeunit "Temp Blob"

    Codeunit “Temp Blob”

  • valuesOnly Boolean

    Boolean

  • Returns Boolean

    Boolean


Serialize

procedure Serialize(var tempBlob: Codeunit "Temp Blob"): Boolean

Serialize the Json Dictionary to a TempBlob.

Parameters / Return Value

  • tempBlob Codeunit "Temp Blob"

    Codeunit “Temp Blob”

  • Returns Boolean

    Boolean


Deserialize

procedure Deserialize(var fromStream: InStream): Boolean

Deserialize a Json Dictionary from an InStream.

Parameters / Return Value

  • fromStream InStream

    InStream

  • Returns Boolean

    Boolean


Deserialize

procedure Deserialize(jsonText: Text): Boolean

Deserialize a Json Dictionary from a text.

Parameters / Return Value

  • jsonText Text

    Text

  • Returns Boolean

    Boolean


Deserialize

procedure Deserialize(var tempBlob: Codeunit "Temp Blob"): Boolean

Deserialize a Json Dictionary from TempBlob.

Parameters / Return Value

  • tempBlob Codeunit "Temp Blob"

    Codeunit “Temp Blob”

  • Returns Boolean

    Boolean


Add

procedure Add(dictKey: Text; value: Variant; typeName: Text; force: Boolean): Boolean

Add an entry to the Dictionary and force the data type. Specify force to overwrite existing keys.

Parameters / Return Value

  • dictKey Text

    Text

  • value Variant

    Variant

  • typeName Text

    Text

  • force Boolean

    Boolean

  • Returns Boolean

    Boolean


Add

procedure Add(dictKey: Text; value: Variant; typeName: Text): Boolean

Add an entry to the Dictionary and force the data type.

Parameters / Return Value

  • dictKey Text

    Text

  • value Variant

    Variant

  • typeName Text

    Text

  • Returns Boolean

    Boolean


Add

procedure Add(dictKey: Text; value: Variant): Boolean

Add an entry to the Dictionary.

Parameters / Return Value

  • dictKey Text

    Text

  • value Variant

    Variant

  • Returns Boolean

    Boolean


AddRange

procedure AddRange(var newDict: Codeunit "M365 Json Dictionary"): Boolean

Add all entries of the passed Dictionary.

Parameters / Return Value

  • newDict Codeunit "M365 Json Dictionary"

    Codeunit “M365 Json Dictionary”

  • Returns Boolean

    Boolean


Set

procedure Set(dictKey: Text; value: Variant; typeName: Text): Boolean

Set an entry to the supplied value in the Dictionary.

Parameters / Return Value

  • dictKey Text

    Text

  • value Variant

    Variant

  • typeName Text

    Text

  • Returns Boolean

    Boolean


Set

procedure Set(dictKey: Text; value: Variant): Boolean

Set an entry to the supplied value in the Dictionary.

Parameters / Return Value

  • dictKey Text

    Text

  • value Variant

    Variant

  • Returns Boolean

    Boolean


Clear

procedure Clear()

Clear the dictionary.


Count

procedure Count(): Integer

Return the number of entries in the Dictionary.

Parameters / Return Value

  • Returns Integer

    Integer


Keys

procedure Keys(var dictKeys: List of [Text])

Returns the List of keys in the Dictionary.

Parameters / Return Value

  • dictKeys List[Text]

    List of [Text]


ContainsKey

procedure ContainsKey(dictKey: Text): Boolean

Returns true if the Dictionary contains the key.

Parameters / Return Value

  • dictKey Text

    Text

  • Returns Boolean

    Boolean


ContainsValue

procedure ContainsValue(value: Variant): Boolean

Returns true if the Dictionary contains the value.

Parameters / Return Value

  • value Variant

    Variant

  • Returns Boolean

    Boolean


Remove

procedure Remove(dictKey: Text)

Removes the Dictionary entry corresponding to the passed key.

Parameters / Return Value

  • dictKey Text

    Text


GetJToken

procedure GetJToken(dictKey: Text; var jToken: JsonToken): Boolean

Return the value of the specified key as a JsonToken.

Parameters / Return Value

  • dictKey Text

    Text

  • jToken JsonToken

    JsonToken

  • Returns Boolean

    Boolean


GetJToken

procedure GetJToken(dictKey: Text): JsonToken

Return the value of the specified key as a JsonToken.

Parameters / Return Value

  • dictKey Text

    Text

  • Returns JsonToken

    JsonToken


GetJValue

procedure GetJValue(dictKey: Text): JsonValue

Return the value of the specified key as a JsonValue.

Parameters / Return Value

  • dictKey Text

    Text

  • Returns JsonValue

    JsonValue


GetTypeObject

procedure GetTypeObject(dictKey: Text; var typeVariant: Variant): Boolean

Returns the type of the specified Dictionary entry.

Parameters / Return Value

  • dictKey Text

    Text

  • typeVariant Variant

    Variant

  • Returns Boolean

    Boolean


GetValue

procedure GetValue(dictKey: Text; var value: Variant): Boolean

Returns the variant value of the specified Dictionary entry.

Parameters / Return Value

  • dictKey Text

    Text

  • value Variant

    Variant

  • Returns Boolean

    Boolean


GetType

procedure GetType(dictKey: Text): Text

Returns the text type of the specified Dictionary entry.

Parameters / Return Value

  • dictKey Text

    Text

  • Returns Text

    Text


GetValue

procedure GetValue(dictKey: Text; var returnJsonDictionary: Codeunit "M365 Json Dictionary"): Boolean

Returns the Sub-instance of the specified key (as Codeunit).

Parameters / Return Value

  • dictKey Text

    Text

  • returnJsonDictionary Codeunit "M365 Json Dictionary"

    Codeunit “M365 Json Dictionary”

  • Returns Boolean

    Boolean


GetDictionary

procedure GetDictionary(dictKey: Text; var returnJsonDictionary: Codeunit "M365 Json Dictionary"): Boolean

Returns the Sub-instance of the specified key (as Codeunit).

Parameters / Return Value

  • dictKey Text

    Text

  • returnJsonDictionary Codeunit "M365 Json Dictionary"

    Codeunit “M365 Json Dictionary”

  • Returns Boolean

    Boolean


GetPath

procedure GetPath(dictPath: Text; var returnToken: JsonToken): Boolean

Returns a JsonToken after navigating to the specified path. A path of Config.State.Status refers to Object { “Config”: { “State”: { “Status”: “Running” } } }

Parameters / Return Value

  • dictPath Text

    The path to the value

  • returnToken JsonToken

    The found token

  • Returns Boolean

    true, if the path was found, false otherwise.


GetPath

procedure GetPath(dictPath: Text; var value: Variant): Boolean

Returns a variant value after navigating to the specified path. A path of Config.State.Status refers to Object { “Config”: { “State”: { “Status”: “Running” } } }

Parameters / Return Value

  • dictPath Text

    The path to the value

  • value Variant

    The found value

  • Returns Boolean

    true, if the path was found, false otherwise.


ToNameValueBuffer

procedure ToNameValueBuffer(var tempToNameValueBuffer: Record "Name/Value Buffer" temporary; keepExisting: Boolean): Boolean

Transfer the contents of this Dictionary to a temporary Name/Value Buffer. Specify keepExisting if you do not want existing records to be deleted.

Parameters / Return Value

  • tempToNameValueBuffer Record "Name/Value Buffer"

    Record “Name/Value Buffer”

  • keepExisting Boolean

    Boolean

  • Returns Boolean

    Boolean


ToNameValueBuffer

procedure ToNameValueBuffer(var tempToNameValueBuffer: Record "Name/Value Buffer" temporary): Boolean

Transfer the contents of this Dictionary to a temporary Name/Value Buffer.

Parameters / Return Value

  • tempToNameValueBuffer Record "Name/Value Buffer"

    Record “Name/Value Buffer”

  • Returns Boolean

    Boolean


FromNameValueBuffer

procedure FromNameValueBuffer(var fromNameValueBuffer: Record "Name/Value Buffer"; keepExisting: Boolean): Boolean

Transfer the contents of a (temporary) Name/Value Buffer to this Dictionary. Specify keepExisting if you do not want existing entries to be deleted.

Parameters / Return Value

  • fromNameValueBuffer Record "Name/Value Buffer"

    Record “Name/Value Buffer”

  • keepExisting Boolean

    Boolean

  • Returns Boolean

    Boolean


FromNameValueBuffer

procedure FromNameValueBuffer(var fromNameValueBuffer: Record "Name/Value Buffer"): Boolean

Transfer the contents of a (temporary) Name/Value Buffer to this Dictionary. Specify keepExisting if you do not want existing entries to be deleted.

Parameters / Return Value

  • fromNameValueBuffer Record "Name/Value Buffer"

    Record “Name/Value Buffer”

  • Returns Boolean

    Boolean


FromDictionary

procedure FromDictionary(fromDict: Dictionary of [Text, Text]; keepExisting: Boolean): Boolean

Transfer a BC Dictionary of [Text, Text] into this Dictionary. Specify keepExisting to if you want existing entries to be kept.

Parameters / Return Value

  • fromDict Dictionary[Text,Text]

    Dictionary of [Text, Text]

  • keepExisting Boolean

    Boolean

  • Returns Boolean

    Boolean


FromDictionary

procedure FromDictionary(fromDict: Dictionary of [Text, Text]): Boolean

Transfer a BC Dictionary of [Text, Text] into this Dictionary.

Parameters / Return Value

  • fromDict Dictionary[Text,Text]

    Dictionary of [Text, Text]

  • Returns Boolean

    Boolean


ToDictionary

procedure ToDictionary(var toDict: Dictionary of [Text, Text]; keepExisting: Boolean): Boolean

Convert this Dictionary to a BC Dictionary of [Text, Text]. Specify keepExisting to if you want existing entries to be kept.

Parameters / Return Value

  • toDict Dictionary[Text,Text]

    Dictionary of [Text, Text]

  • keepExisting Boolean

    Boolean

  • Returns Boolean

    Boolean


ToDictionary

procedure ToDictionary(var toDict: Dictionary of [Text, Text]): Boolean

Convert this Dictionary to a BC Dictionary of [Text, Text].

Parameters / Return Value

  • toDict Dictionary[Text,Text]

    Dictionary of [Text, Text]

  • Returns Boolean

    Boolean


Edit

procedure Edit(placeOnName: Text): Boolean

Edit this Json Dictionary. The Record pointer is placed on placeOnName.

Parameters / Return Value

  • placeOnName Text

    Text

  • Returns Boolean

    Boolean


Edit

procedure Edit(): Boolean

Edit this Json Dictionary.

Parameters / Return Value

  • Returns Boolean

    Boolean


Show

procedure Show(placeOnName: Text): Boolean

Show this Json Dictionary. The Record pointer is placed on placeOnName.

Parameters / Return Value

  • placeOnName Text

    Text

  • Returns Boolean

    Boolean


Show

procedure Show(): Boolean

Show this Json Dictionary.

Parameters / Return Value

  • Returns Boolean

    Boolean


Dump

procedure Dump(template: Text): Text

Dump the contained dictionary keys and values to text in the format provided by template. %1 = dictionary key, %2 = dictionary value.

Parameters / Return Value

  • template Text

    Text

  • Returns Text

    Text


Dump

procedure Dump(): Text

Dump the contained dictionary keys and values to text in the format dictKey = ‘dictValue’ (dataType).

Parameters / Return Value

  • Returns Text

    Text



EOS Labs -