Description

Populates the collection with the values from a JSON string.

Syntax

Sub FromJSON(jsonString As String)

Parameters

A string value that represents a serialised collection 

Return

none

Example

'create Pentagon DOCS Script Library object

Set scriptLib = GetExtensionObject("PentagonDOCS.Core.ScriptLibrary")


'add key value pairs

Dim newKVP : Set newKVP = scriptLib.NewStringKvP

newKvP.Add "KeyName1","NewValue"

newKvP.Add "KeyName2","NewValue"

newKvP.Add "KeyName3","NewValue"


'ToJson

Dim JsonStr : jsonStr = newKVP.ToJson()


'FromJSON

newKvP.FromJSON(JsonStr)