Class JsonReaderParser<T>
Provides a way to parse and extract values from a JSON document.
Inheritance
Namespace: Cuemon.Serialization.Json
Assembly: Cuemon.Serialization.Json.dll
Syntax
public class JsonReaderParser<T> : object
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object to apply a JSON document. |
Properties
| Improve this DocInstance
Gets the instance specified on Create<T>(T, JsonReader), but initialized with GetValues(String, Action<T, IDictionary<String, JsonReaderResult>>) and/or GetValuesFromArray(String, Action<T, IDictionary<String, IEnumerable<JsonReaderResult>>>).
Declaration
public T Instance { get; }
Property Value
| Type | Description |
|---|---|
| T | The instance specified on Create<T>(T, JsonReader). |
Methods
| Improve this DocGetValues(String, Action<T, IDictionary<String, JsonReaderResult>>)
Retrieves one or more values from the specified propertyNames using the specified delegate parser.
Declaration
public JsonReaderParser<T> GetValues(string propertyNames, Action<T, IDictionary<string, JsonReaderResult>> parser)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | propertyNames | The comma-delimited property names (JSON path) to math in a JSON document. |
| Action<T, IDictionary<System.String, JsonReaderResult>> | parser | The delegate that will extract values from |
Returns
| Type | Description |
|---|---|
| JsonReaderParser<T> | A reference to this JsonReaderParser<T> instance. |
GetValuesFromArray(String, Action<T, IDictionary<String, IEnumerable<JsonReaderResult>>>)
Retreives one or more values from the specified propertyNames using the specified delegate parser. Optimized for JSON arrays.
Declaration
public JsonReaderParser<T> GetValuesFromArray(string propertyNames, Action<T, IDictionary<string, IEnumerable<JsonReaderResult>>> parser)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | propertyNames | The comma-delimited property names (JSON path) to math in a JSON document. |
| Action<T, IDictionary<System.String, IEnumerable<JsonReaderResult>>> | parser | The delegate that will extract values from |
Returns
| Type | Description |
|---|---|
| JsonReaderParser<T> | A reference to this JsonReaderParser<T> instance. |