Provides utility methods for navigating and extracting values from JSON objects (JObject) and strongly-typed .NET objects using path expressions.
More...
|
| static bool? object value | FindJObject (JObject jsonObject, PromptAction action, ILogger? logger) |
|
static ? PropertyInfo? object? object parent | FindValue (object rootObject, string propertyPath) |
|
| static bool | found |
| | Searches for a value in a JObject using a property path from a PromptAction. Handles special cases like "$values" arrays and indexed array access.
|
| static ? PropertyInfo | prop |
| | Navigates through a .NET object hierarchy using a dot-notation property path with optional array indexing.
|
|
static ? PropertyInfo? object | value |
Provides utility methods for navigating and extracting values from JSON objects (JObject) and strongly-typed .NET objects using path expressions.
◆ FindJObject()
| bool? object value VectoInputManager.Core.PathUtils.FindJObject |
( |
JObject | jsonObject, |
|
|
PromptAction | action, |
|
|
ILogger? | logger ) |
|
inlinestatic |
Gets the default value for complex types (Class or Collection) from the action's template or selection.
◆ found
| bool VectoInputManager.Core.PathUtils.found |
|
static |
Searches for a value in a JObject using a property path from a PromptAction. Handles special cases like "$values" arrays and indexed array access.
- Parameters
-
| jsonObject | The JObject to search within. |
| action | The PromptAction containing the property path and type information. |
- Returns
- A tuple indicating if the value was found and the extracted value (or default).
◆ prop
| ? PropertyInfo VectoInputManager.Core.PathUtils.prop |
|
static |
Navigates through a .NET object hierarchy using a dot-notation property path with optional array indexing.
- Parameters
-
| rootObject | The root object to start navigation from. |
| propertyPath | The property path (e.g., "ElectricMotorTorqueLimits.ElectricMachine.VoltageLevel[0].Voltage"). |
- Returns
- A tuple containing the final PropertyInfo, its value, and the parent object.
The documentation for this class was generated from the following file:
- VectoInputManagerCore/PathUtils.cs