Click or drag to resize

JObjectHelper Methods

The JObjectHelper type exposes the following members.

Methods
  NameDescription
Public methodEnsureArrayExists
Returns a reference to an array object at the specified property within an object. Creating the array if the property is not yet set. Throws an exception if a non-array value already exists at the property.
Public methodEnsureObjectExists(JArray, Int32)
Returns a reference to an object at the specified index within an array. Creating an object at the specified location if one doesn't already exist there. Throws an exception if a non-object value already exists at the index.
Public methodEnsureObjectExists(JObject, String)
Returns a reference to an object at the specified property within another object. Creating the object if the property is not yet set. Throws an exception if a non-object value already exists at the property.
Public methodReplaceValue
Replaces a value in a JSON structure with another value.
Public methodSetArrayItem
Sets a value at a certain index in an array.
Public methodSetOriginalValue
Sets the original (source) value in a location corresponding to the targetValue location in the target structure. This allows for the original value to be preserved when reverting back to the original format for conversions that lose information.
Public methodSetValue
Sets a value in a target JSON structure at the specified path.
Public methodTryFindOriginalValue
Retrieves an original value that may have been set in a source structure for converted values that might lose some information. Typically the original value would have been saved with the SetOriginalValue(JToken, JToken, String) method.
Public methodTryGetArrayIndex
Attempts to extract an array index value from a json path segment.
Top
See Also