IJsonReadOnlyProxy

Namespace: SnowBank.Data.Json · interface

Implements: IJsonSerializable, IJsonPackable, IEquatable<JsonValue>, IEquatable<ObservableJsonValue>

Wraps a JsonValue into a typed read-only proxy

Methods

Get

ObservableJsonValue Get()

Returns the underlying observable value

This value can be used to "escape" the type safety of the proxy, while still allowing for tracking of read access.

ObservableJsonValue Get(string name)

Returns the value of the field with the specified name

This value can be used to "escape" the type safety of the proxy, while still allowing for tracking of read access.

ObservableJsonValue Get(ReadOnlyMemory<char> name)

Returns the value of the field with the specified name

This value can be used to "escape" the type safety of the proxy, while still allowing for tracking of read access.

ObservableJsonValue Get(int index)

Returns the value of the element at the specified location

This value can be used to "escape" the type safety of the proxy, while still allowing for tracking of read access.

ObservableJsonValue Get(Index index)

Returns the value of the element at the specified location

This value can be used to "escape" the type safety of the proxy, while still allowing for tracking of read access.

ObservableJsonValue Get(JsonPath path)

Returns the value of the child at the specified path

This value can be used to "escape" the type safety of the proxy, while still allowing for tracking of read access.

GetContext

IObservableJsonContext GetContext()

Returns the (optional) tracking context attached to this instance

If non-null, this context will record all read access made to this instance, or any of its children

ToJsonValue

JsonValue ToJsonValue()

Returns the proxied JSON Value

The returned value is read-only and cannot be changed.

The value will be marked as having been accessed by value.