Interface IModelNodeAccessor
- Namespace
- MRX.Json.Reflection.Abstractions
- Assembly
- MRX.Json.Reflection.dll
Resolves a single JSON path token against a model instance, reading the value it refers to.
public interface IModelNodeAccessor
Methods
CanHandle(JsonPathTokenType, string, object)
Determines whether this accessor is able to resolve token against container.
bool CanHandle(JsonPathTokenType tokenType, string token, object container)
Parameters
tokenTypeJsonPathTokenTypeThe kind of path token being resolved (property, array index, etc.).
tokenstringThe raw token text extracted from the JSON path.
containerobjectThe object instance the token should be resolved against.
Returns
GetValue(string, object)
Resolves the value referred to by token on container.
object? GetValue(string token, object container)
Parameters
tokenstringThe raw token text extracted from the JSON path.
containerobjectThe object instance to read the value from.