JsonDocument

Overview

Root node of json data

Location

  • Reference:
    • Elements.dll  .NET, .NET Standard 2.0
    • elements.jar  Cooper
    • Elements.fx  Island, ToffeeV2
    • libElements.fx  Toffee
  • Namespace: RemObjects.Elements.RTL
  • Platforms: .NET, .NET Standard 2.0, Cooper, Island, Toffee, ToffeeV2

 

constructor

 

constructor

 

JsonDocument()

 

init()

 

JsonDocument()

 

Sub New()

constructor (not nullable JsonNode)

 

constructor(aRoot: not nullable JsonNode)

 

JsonDocument(JsonNode! aRoot)

 

init(_ aRoot: JsonNode)

 

JsonDocument(JsonNode aRoot)

 

Sub New(aRoot As JsonNode)

Parameters:

  • aRoot:

CreateDocument

Create a new json document.

 

class method CreateDocument: not nullable JsonDocument

 

static JsonDocument! CreateDocument()

 

static func CreateDocument() -> JsonDocument

 

static JsonDocument CreateDocument()

 

Shared Function CreateDocument() As JsonDocument

description  override Toffee, ToffeeV2

Converts this json document to string.

 

func description() -> NSString

FromBinary

Parse json from a binary.

 

class method FromBinary(aBinary: not nullable ImmutableBinary; aEncoding: Encoding): not nullable JsonDocument

 

static JsonDocument! FromBinary(ImmutableBinary! aBinary, Encoding aEncoding)

 

static func FromBinary(_ aBinary: ImmutableBinary, _ aEncoding: Encoding) -> JsonDocument

 

static JsonDocument FromBinary(ImmutableBinary aBinary, Encoding aEncoding)

 

Shared Function FromBinary(aBinary As ImmutableBinary, aEncoding As Encoding) As JsonDocument

Parameters:

  • aBinary:
  • aEncoding:

FromFile .NET, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Parse json from a file.

 

class method FromFile(aFile: not nullable File): not nullable JsonDocument

 

static JsonDocument! FromFile(File! aFile)

 

static func FromFile(_ aFile: File) -> JsonDocument

 

static JsonDocument FromFile(File aFile)

 

Shared Function FromFile(aFile As File) As JsonDocument

Parameters:

  • aFile:

FromString

Parse json from a string.

 

class method FromString(aString: not nullable String): not nullable JsonDocument

 

static JsonDocument! FromString(String! aString)

 

static func FromString(_ aString: String) -> JsonDocument

 

static JsonDocument FromString(String aString)

 

Shared Function FromString(aString As String) As JsonDocument

Parameters:

  • aString:

FromUrl .NET, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method FromUrl(aUrl: not nullable Url): not nullable JsonDocument

 

static JsonDocument! FromUrl(Url! aUrl)

 

static func FromUrl(_ aUrl: Url) -> JsonDocument

 

static JsonDocument FromUrl(Url aUrl)

 

Shared Function FromUrl(aUrl As Url) As JsonDocument

Parameters:

  • aUrl:

Item  virtual

Returns the item by key name.

 

property Item[Key: String]: nullable JsonNode read write;

 

JsonNode? Item[String Key] { get; set; }

 

// .NET, .NET Standard 2.0, Island, ToffeeV2
subscript Item(_ Key: String) -> JsonNode? { get{} set{} }
// Toffee
subscript Item(_ Key: String) -> JsonNode { get{} set{} }

 

JsonNode Item[String Key] { __get; __set; }

 

Property Item(Key As String) As JsonNode?

Keys  virtual

Returns all keys in this document.

 

property Keys: not nullable IEnumerable<String> read;

 

IEnumerable<String>! Keys { get; }

 

// .NET, .NET Standard 2.0, Island, ToffeeV2
var Keys: IEnumerable<String> { get{} }
// Toffee
var Keys: INSFastEnumeration<String> { get{} }

 

Iterable<String> Keys { __get; }

 

ReadOnly Property Keys() As IEnumerable<String>

Root

Returns the root node.

 

property Root: not nullable JsonNode read;

 

JsonNode! Root { get; }

 

var Root: JsonNode { get{} }

 

JsonNode Root { __get; }

 

ReadOnly Property Root() As JsonNode

RootObject

Returns the root node.

 

property RootObject: not nullable JsonObject read;

 

JsonObject! RootObject { get; }

 

var RootObject: JsonObject { get{} }

 

JsonObject RootObject { __get; }

 

ReadOnly Property RootObject() As JsonObject

ToJson

 

method ToJson(aFormat: JsonFormat): String

 

String ToJson(JsonFormat aFormat)

 

func ToJson(_ aFormat: JsonFormat) -> String

 

String ToJson(JsonFormat aFormat)

 

Function ToJson(aFormat As JsonFormat) As String

Parameters:

  • aFormat:

toString Cooper

 

method toString: PlatformString

 

PlatformString toString()

 

func toString() -> PlatformString

 

PlatformString toString()

 

Function toString() As PlatformString

ToString  virtual Toffee, ToffeeV2

 

func ToString() -> String

TryFromBinary (not nullable ImmutableBinary, Encoding): nullable JsonDocument

Parse json from a binary.

 

class method TryFromBinary(aBinary: not nullable ImmutableBinary; aEncoding: Encoding): nullable JsonDocument

 

static JsonDocument? TryFromBinary(ImmutableBinary! aBinary, Encoding aEncoding)

 

// Toffee
static func TryFromBinary(_ aBinary: ImmutableBinary, _ aEncoding: Encoding) -> JsonDocument
// ToffeeV2
static func TryFromBinary(_ aBinary: ImmutableBinary, _ aEncoding: Encoding) -> JsonDocument?

 

static JsonDocument TryFromBinary(ImmutableBinary aBinary, Encoding aEncoding)

 

Shared Function TryFromBinary(aBinary As ImmutableBinary, aEncoding As Encoding) As JsonDocument?

Parameters:

  • aBinary:
  • aEncoding:

TryFromBinary (not nullable ImmutableBinary, Encoding, Exception): nullable JsonDocument

 

class method TryFromBinary(aBinary: not nullable ImmutableBinary; aEncoding: Encoding; out aException: Exception): nullable JsonDocument

 

static JsonDocument? TryFromBinary(ImmutableBinary! aBinary, Encoding aEncoding, out Exception aException)

 

// Toffee
static func TryFromBinary(_ aBinary: ImmutableBinary, _ aEncoding: Encoding, _ aException: Exception) -> JsonDocument
// ToffeeV2
static func TryFromBinary(_ aBinary: ImmutableBinary, _ aEncoding: Encoding, _ aException: Exception) -> JsonDocument?

 

static JsonDocument TryFromBinary(ImmutableBinary aBinary, Encoding aEncoding, __out Exception aException)

 

Shared Function TryFromBinary(aBinary As ImmutableBinary, aEncoding As Encoding, <OutAttribute> ByRef aException As Exception) As JsonDocument?

Parameters:

  • aBinary:
  • aEncoding:
  • aException:

TryFromFile (not nullable File): nullable JsonDocument .NET, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Parse json from a file.

 

class method TryFromFile(aFile: not nullable File): nullable JsonDocument

 

static JsonDocument? TryFromFile(File! aFile)

 

// Toffee
static func TryFromFile(_ aFile: File) -> JsonDocument
// ToffeeV2
static func TryFromFile(_ aFile: File) -> JsonDocument?

 

static JsonDocument TryFromFile(File aFile)

 

Shared Function TryFromFile(aFile As File) As JsonDocument?

Parameters:

  • aFile:

TryFromFile (not nullable File, Exception): nullable JsonDocument .NET, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method TryFromFile(aFile: not nullable File; out aException: Exception): nullable JsonDocument

 

static JsonDocument? TryFromFile(File! aFile, out Exception aException)

 

// Toffee
static func TryFromFile(_ aFile: File, _ aException: Exception) -> JsonDocument
// ToffeeV2
static func TryFromFile(_ aFile: File, _ aException: Exception) -> JsonDocument?

 

static JsonDocument TryFromFile(File aFile, __out Exception aException)

 

Shared Function TryFromFile(aFile As File, <OutAttribute> ByRef aException As Exception) As JsonDocument?

Parameters:

  • aFile:
  • aException:

TryFromString (not nullable String): nullable JsonDocument

Parse json from a string.

 

class method TryFromString(aString: not nullable String): nullable JsonDocument

 

static JsonDocument? TryFromString(String! aString)

 

// Toffee
static func TryFromString(_ aString: String) -> JsonDocument
// ToffeeV2
static func TryFromString(_ aString: String) -> JsonDocument?

 

static JsonDocument TryFromString(String aString)

 

Shared Function TryFromString(aString As String) As JsonDocument?

Parameters:

  • aString:

TryFromString (not nullable String, Exception): nullable JsonDocument

 

class method TryFromString(aString: not nullable String; out aException: Exception): nullable JsonDocument

 

static JsonDocument? TryFromString(String! aString, out Exception aException)

 

// Toffee
static func TryFromString(_ aString: String, _ aException: Exception) -> JsonDocument
// ToffeeV2
static func TryFromString(_ aString: String, _ aException: Exception) -> JsonDocument?

 

static JsonDocument TryFromString(String aString, __out Exception aException)

 

Shared Function TryFromString(aString As String, <OutAttribute> ByRef aException As Exception) As JsonDocument?

Parameters:

  • aString:
  • aException:

 

Item  virtual

Returns the item by key name.

 

property Item[Key: String]: nullable JsonNode read write;

 

JsonNode? Item[String Key] { get; set; }

 

// .NET, .NET Standard 2.0, Island, ToffeeV2
subscript Item(_ Key: String) -> JsonNode? { get{} set{} }
// Toffee
subscript Item(_ Key: String) -> JsonNode { get{} set{} }

 

JsonNode Item[String Key] { __get; __set; }

 

Property Item(Key As String) As JsonNode?

Keys  virtual

Returns all keys in this document.

 

property Keys: not nullable IEnumerable<String> read;

 

IEnumerable<String>! Keys { get; }

 

// .NET, .NET Standard 2.0, Island, ToffeeV2
var Keys: IEnumerable<String> { get{} }
// Toffee
var Keys: INSFastEnumeration<String> { get{} }

 

Iterable<String> Keys { __get; }

 

ReadOnly Property Keys() As IEnumerable<String>

Root

Returns the root node.

 

property Root: not nullable JsonNode read;

 

JsonNode! Root { get; }

 

var Root: JsonNode { get{} }

 

JsonNode Root { __get; }

 

ReadOnly Property Root() As JsonNode

RootObject

Returns the root node.

 

property RootObject: not nullable JsonObject read;

 

JsonObject! RootObject { get; }

 

var RootObject: JsonObject { get{} }

 

JsonObject RootObject { __get; }

 

ReadOnly Property RootObject() As JsonObject

 

CreateDocument

Create a new json document.

 

class method CreateDocument: not nullable JsonDocument

 

static JsonDocument! CreateDocument()

 

static func CreateDocument() -> JsonDocument

 

static JsonDocument CreateDocument()

 

Shared Function CreateDocument() As JsonDocument

FromBinary

Parse json from a binary.

 

class method FromBinary(aBinary: not nullable ImmutableBinary; aEncoding: Encoding): not nullable JsonDocument

 

static JsonDocument! FromBinary(ImmutableBinary! aBinary, Encoding aEncoding)

 

static func FromBinary(_ aBinary: ImmutableBinary, _ aEncoding: Encoding) -> JsonDocument

 

static JsonDocument FromBinary(ImmutableBinary aBinary, Encoding aEncoding)

 

Shared Function FromBinary(aBinary As ImmutableBinary, aEncoding As Encoding) As JsonDocument

Parameters:

  • aBinary:
  • aEncoding:

FromFile .NET, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Parse json from a file.

 

class method FromFile(aFile: not nullable File): not nullable JsonDocument

 

static JsonDocument! FromFile(File! aFile)

 

static func FromFile(_ aFile: File) -> JsonDocument

 

static JsonDocument FromFile(File aFile)

 

Shared Function FromFile(aFile As File) As JsonDocument

Parameters:

  • aFile:

FromString

Parse json from a string.

 

class method FromString(aString: not nullable String): not nullable JsonDocument

 

static JsonDocument! FromString(String! aString)

 

static func FromString(_ aString: String) -> JsonDocument

 

static JsonDocument FromString(String aString)

 

Shared Function FromString(aString As String) As JsonDocument

Parameters:

  • aString:

FromUrl .NET, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method FromUrl(aUrl: not nullable Url): not nullable JsonDocument

 

static JsonDocument! FromUrl(Url! aUrl)

 

static func FromUrl(_ aUrl: Url) -> JsonDocument

 

static JsonDocument FromUrl(Url aUrl)

 

Shared Function FromUrl(aUrl As Url) As JsonDocument

Parameters:

  • aUrl:

TryFromBinary (not nullable ImmutableBinary, Encoding): nullable JsonDocument

Parse json from a binary.

 

class method TryFromBinary(aBinary: not nullable ImmutableBinary; aEncoding: Encoding): nullable JsonDocument

 

static JsonDocument? TryFromBinary(ImmutableBinary! aBinary, Encoding aEncoding)

 

// Toffee
static func TryFromBinary(_ aBinary: ImmutableBinary, _ aEncoding: Encoding) -> JsonDocument
// ToffeeV2
static func TryFromBinary(_ aBinary: ImmutableBinary, _ aEncoding: Encoding) -> JsonDocument?

 

static JsonDocument TryFromBinary(ImmutableBinary aBinary, Encoding aEncoding)

 

Shared Function TryFromBinary(aBinary As ImmutableBinary, aEncoding As Encoding) As JsonDocument?

Parameters:

  • aBinary:
  • aEncoding:

TryFromBinary (not nullable ImmutableBinary, Encoding, Exception): nullable JsonDocument

 

class method TryFromBinary(aBinary: not nullable ImmutableBinary; aEncoding: Encoding; out aException: Exception): nullable JsonDocument

 

static JsonDocument? TryFromBinary(ImmutableBinary! aBinary, Encoding aEncoding, out Exception aException)

 

// Toffee
static func TryFromBinary(_ aBinary: ImmutableBinary, _ aEncoding: Encoding, _ aException: Exception) -> JsonDocument
// ToffeeV2
static func TryFromBinary(_ aBinary: ImmutableBinary, _ aEncoding: Encoding, _ aException: Exception) -> JsonDocument?

 

static JsonDocument TryFromBinary(ImmutableBinary aBinary, Encoding aEncoding, __out Exception aException)

 

Shared Function TryFromBinary(aBinary As ImmutableBinary, aEncoding As Encoding, <OutAttribute> ByRef aException As Exception) As JsonDocument?

Parameters:

  • aBinary:
  • aEncoding:
  • aException:

TryFromFile (not nullable File): nullable JsonDocument .NET, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

Parse json from a file.

 

class method TryFromFile(aFile: not nullable File): nullable JsonDocument

 

static JsonDocument? TryFromFile(File! aFile)

 

// Toffee
static func TryFromFile(_ aFile: File) -> JsonDocument
// ToffeeV2
static func TryFromFile(_ aFile: File) -> JsonDocument?

 

static JsonDocument TryFromFile(File aFile)

 

Shared Function TryFromFile(aFile As File) As JsonDocument?

Parameters:

  • aFile:

TryFromFile (not nullable File, Exception): nullable JsonDocument .NET, .NET Standard 2.0, Cooper, Island-Android, Island-iOS, Island-iOS Simulator, Island-Mac Catalyst, Island-macOS, Island-tvOS, Island-tvOS Simulator, Island-Ubuntu, Island-watchOS, Island-watchOS Simulator, Island-Windows, Toffee, ToffeeV2

 

class method TryFromFile(aFile: not nullable File; out aException: Exception): nullable JsonDocument

 

static JsonDocument? TryFromFile(File! aFile, out Exception aException)

 

// Toffee
static func TryFromFile(_ aFile: File, _ aException: Exception) -> JsonDocument
// ToffeeV2
static func TryFromFile(_ aFile: File, _ aException: Exception) -> JsonDocument?

 

static JsonDocument TryFromFile(File aFile, __out Exception aException)

 

Shared Function TryFromFile(aFile As File, <OutAttribute> ByRef aException As Exception) As JsonDocument?

Parameters:

  • aFile:
  • aException:

TryFromString (not nullable String): nullable JsonDocument

Parse json from a string.

 

class method TryFromString(aString: not nullable String): nullable JsonDocument

 

static JsonDocument? TryFromString(String! aString)

 

// Toffee
static func TryFromString(_ aString: String) -> JsonDocument
// ToffeeV2
static func TryFromString(_ aString: String) -> JsonDocument?

 

static JsonDocument TryFromString(String aString)

 

Shared Function TryFromString(aString As String) As JsonDocument?

Parameters:

  • aString:

TryFromString (not nullable String, Exception): nullable JsonDocument

 

class method TryFromString(aString: not nullable String; out aException: Exception): nullable JsonDocument

 

static JsonDocument? TryFromString(String! aString, out Exception aException)

 

// Toffee
static func TryFromString(_ aString: String, _ aException: Exception) -> JsonDocument
// ToffeeV2
static func TryFromString(_ aString: String, _ aException: Exception) -> JsonDocument?

 

static JsonDocument TryFromString(String aString, __out Exception aException)

 

Shared Function TryFromString(aString As String, <OutAttribute> ByRef aException As Exception) As JsonDocument?

Parameters:

  • aString:
  • aException:

 

constructor

 

constructor

 

JsonDocument()

 

init()

 

JsonDocument()

 

Sub New()

constructor (not nullable JsonNode)

 

constructor(aRoot: not nullable JsonNode)

 

JsonDocument(JsonNode! aRoot)

 

init(_ aRoot: JsonNode)

 

JsonDocument(JsonNode aRoot)

 

Sub New(aRoot As JsonNode)

Parameters:

  • aRoot:

description  override Toffee, ToffeeV2

Converts this json document to string.

 

func description() -> NSString

ToJson

 

method ToJson(aFormat: JsonFormat): String

 

String ToJson(JsonFormat aFormat)

 

func ToJson(_ aFormat: JsonFormat) -> String

 

String ToJson(JsonFormat aFormat)

 

Function ToJson(aFormat As JsonFormat) As String

Parameters:

  • aFormat:

toString Cooper

 

method toString: PlatformString

 

PlatformString toString()

 

func toString() -> PlatformString

 

PlatformString toString()

 

Function toString() As PlatformString

ToString  virtual Toffee, ToffeeV2

 

func ToString() -> String