Show / Hide Table of Contents

Class JsonPointer

Represents a JSON Pointer.

Inheritance
System.Object
System.Collections.Generic.List<System.String>
JsonPointer
Implements
System.Collections.Generic.IList<System.String>
System.Collections.Generic.ICollection<System.String>
System.Collections.Generic.IReadOnlyList<System.String>
System.Collections.Generic.IReadOnlyCollection<System.String>
System.Collections.Generic.IEnumerable<System.String>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
IJsonSerializable
System.IEquatable<JsonPointer>
Inherited Members
System.Collections.Generic.List<System.String>.System.Collections.IList.get_Item(System.Int32)
System.Collections.Generic.List<System.String>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.Generic.List<System.String>.Add(System.String)
System.Collections.Generic.List<System.String>.AddRange(System.Collections.Generic.IEnumerable<System.String>)
System.Collections.Generic.List<System.String>.AsReadOnly()
System.Collections.Generic.List<System.String>.BinarySearch(System.String)
System.Collections.Generic.List<System.String>.BinarySearch(System.String, System.Collections.Generic.IComparer<System.String>)
System.Collections.Generic.List<System.String>.BinarySearch(System.Int32, System.Int32, System.String, System.Collections.Generic.IComparer<System.String>)
System.Collections.Generic.List<System.String>.Clear()
System.Collections.Generic.List<System.String>.Contains(System.String)
System.Collections.Generic.List<System.String>.ConvertAll<TOutput>(System.Converter<System.String, TOutput>)
System.Collections.Generic.List<System.String>.CopyTo(System.String[])
System.Collections.Generic.List<System.String>.CopyTo(System.String[], System.Int32)
System.Collections.Generic.List<System.String>.CopyTo(System.Int32, System.String[], System.Int32, System.Int32)
System.Collections.Generic.List<System.String>.Exists(System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.Find(System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.FindAll(System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.FindIndex(System.Int32, System.Int32, System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.FindIndex(System.Int32, System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.FindIndex(System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.FindLast(System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.FindLastIndex(System.Int32, System.Int32, System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.FindLastIndex(System.Int32, System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.FindLastIndex(System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.ForEach(System.Action<System.String>)
System.Collections.Generic.List<System.String>.GetEnumerator()
System.Collections.Generic.List<System.String>.GetRange(System.Int32, System.Int32)
System.Collections.Generic.List<System.String>.IndexOf(System.String)
System.Collections.Generic.List<System.String>.IndexOf(System.String, System.Int32)
System.Collections.Generic.List<System.String>.IndexOf(System.String, System.Int32, System.Int32)
System.Collections.Generic.List<System.String>.Insert(System.Int32, System.String)
System.Collections.Generic.List<System.String>.InsertRange(System.Int32, System.Collections.Generic.IEnumerable<System.String>)
System.Collections.Generic.List<System.String>.LastIndexOf(System.String)
System.Collections.Generic.List<System.String>.LastIndexOf(System.String, System.Int32)
System.Collections.Generic.List<System.String>.LastIndexOf(System.String, System.Int32, System.Int32)
System.Collections.Generic.List<System.String>.Remove(System.String)
System.Collections.Generic.List<System.String>.RemoveAll(System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.RemoveAt(System.Int32)
System.Collections.Generic.List<System.String>.RemoveRange(System.Int32, System.Int32)
System.Collections.Generic.List<System.String>.Reverse()
System.Collections.Generic.List<System.String>.Reverse(System.Int32, System.Int32)
System.Collections.Generic.List<System.String>.Sort()
System.Collections.Generic.List<System.String>.Sort(System.Collections.Generic.IComparer<System.String>)
System.Collections.Generic.List<System.String>.Sort(System.Comparison<System.String>)
System.Collections.Generic.List<System.String>.Sort(System.Int32, System.Int32, System.Collections.Generic.IComparer<System.String>)
System.Collections.Generic.List<System.String>.System.Collections.Generic.IEnumerable<System.String>.GetEnumerator()
System.Collections.Generic.List<System.String>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.Generic.List<System.String>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.Generic.List<System.String>.System.Collections.IList.Add(System.Object)
System.Collections.Generic.List<System.String>.System.Collections.IList.Contains(System.Object)
System.Collections.Generic.List<System.String>.System.Collections.IList.IndexOf(System.Object)
System.Collections.Generic.List<System.String>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.Generic.List<System.String>.System.Collections.IList.Remove(System.Object)
System.Collections.Generic.List<System.String>.ToArray()
System.Collections.Generic.List<System.String>.TrimExcess()
System.Collections.Generic.List<System.String>.TrueForAll(System.Predicate<System.String>)
System.Collections.Generic.List<System.String>.Capacity
System.Collections.Generic.List<System.String>.Count
System.Collections.Generic.List<System.String>.Item[System.Int32]
System.Collections.Generic.List<System.String>.System.Collections.Generic.ICollection<System.String>.IsReadOnly
System.Collections.Generic.List<System.String>.System.Collections.ICollection.IsSynchronized
System.Collections.Generic.List<System.String>.System.Collections.ICollection.SyncRoot
System.Collections.Generic.List<System.String>.System.Collections.IList.IsFixedSize
System.Collections.Generic.List<System.String>.System.Collections.IList.IsReadOnly
System.Collections.Generic.List<System.String>.System.Collections.IList.Item[System.Int32]
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Manatee.Json.Pointer
Assembly: Manatee.Json.dll
Syntax
public class JsonPointer : List<string>, IList<string>, ICollection<string>, IReadOnlyList<string>, IReadOnlyCollection<string>, IEnumerable<string>, IList, ICollection, IEnumerable, IJsonSerializable, IEquatable<JsonPointer>

Constructors

| Improve this Doc View Source

JsonPointer()

Creates a new JsonPointer instance.

Declaration
public JsonPointer()
| Improve this Doc View Source

JsonPointer(IEnumerable<String>)

Creates a new JsonPointer instance.

Declaration
public JsonPointer(IEnumerable<string> source)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.String> source

A collection of strings representing the segments of the pointer.

| Improve this Doc View Source

JsonPointer(String[])

Creates a new JsonPointer instance.

Declaration
public JsonPointer(params string[] source)
Parameters
Type Name Description
System.String[] source

A collection of strings representing the segments of the pointer.

Methods

| Improve this Doc View Source

Clone()

Creates a copy of the pointer.

Declaration
public JsonPointer Clone()
Returns
Type Description
JsonPointer
| Improve this Doc View Source

CloneAndAppend(String[])

Creates a copy of the pointer and appends new segments.

Declaration
public JsonPointer CloneAndAppend(params string[] append)
Parameters
Type Name Description
System.String[] append

The segments to append.

Returns
Type Description
JsonPointer
| Improve this Doc View Source

Equals(Nullable<JsonPointer>)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(JsonPointer? other)
Parameters
Type Name Description
System.Nullable<JsonPointer> other

An object to compare with this object.

Returns
Type Description
System.Boolean

true if the current object is equal to the other parameter; otherwise, false.

| Improve this Doc View Source

Equals(Nullable<Object>)

Determines whether the specified object is equal to the current object.

Declaration
public override bool Equals(object? obj)
Parameters
Type Name Description
System.Nullable<System.Object> obj

The object to compare with the current object.

Returns
Type Description
System.Boolean

true if the specified object is equal to the current object; otherwise, false.

| Improve this Doc View Source

Evaluate(JsonValue)

Evaluates the pointer against a JSON instance.

Declaration
public PointerEvaluationResults Evaluate(JsonValue root)
Parameters
Type Name Description
JsonValue root

The JSON instance.

Returns
Type Description
PointerEvaluationResults

The element the pointer references, if any.

| Improve this Doc View Source

FromJson(JsonValue, JsonSerializer)

Builds an object from a JsonValue.

Declaration
public void FromJson(JsonValue json, JsonSerializer serializer)
Parameters
Type Name Description
JsonValue json

The JsonValue representation of the object.

JsonSerializer serializer

The JsonSerializer instance to use for additional serialization of values.

| Improve this Doc View Source

GetHashCode()

Serves as the default hash function.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for the current object.

Overrides
System.Object.GetHashCode()
| Improve this Doc View Source

IsChildOf(JsonPointer)

Determines whether the pointer is a child of another pointer (starts with the same segments).

Declaration
public bool IsChildOf(JsonPointer pointer)
Parameters
Type Name Description
JsonPointer pointer

Another pointer.

Returns
Type Description
System.Boolean

true if this pointer starts with all of the segments of pointer; false otherwise.

| Improve this Doc View Source

Parse(String)

Parses a string containing a JSON Pointer.

Declaration
public static JsonPointer Parse(string source)
Parameters
Type Name Description
System.String source

The source string.

Returns
Type Description
JsonPointer

A JsonPointer instance.

| Improve this Doc View Source

ToJson(JsonSerializer)

Converts an object to a JsonValue.

Declaration
public JsonValue ToJson(JsonSerializer serializer)
Parameters
Type Name Description
JsonSerializer serializer

The JsonSerializer instance to use for additional serialization of values.

Returns
Type Description
JsonValue

The JsonValue representation of the object.

| Improve this Doc View Source

ToString()

Returns a string that represents the current object.

Declaration
public override string ToString()
Returns
Type Description
System.String

A string that represents the current object.

Overrides
System.Object.ToString()

Implements

System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
IJsonSerializable
System.IEquatable<T>

Extension Methods

LinqExtensions.ToJson<T>(IEnumerable<T>, JsonSerializer)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX