Provides JSON serialization and deserialization utilities for VECTO vehicle and component declarations. Handles type information, schema references, and specialized converters for VECTO-specific patterns.
More...
|
| static string | Serialize (object obj, bool addSchema) |
| | Serializes a vehicle or component declaration to JSON format.
|
| static void | SerializeToFile (object obj, string filePath, bool addSchema) |
| | Serializes a vehicle or component declaration to a JSON file.
|
| static object | Deserialize (string json) |
| | Deserializes a JSON string to a vehicle or component declaration object. The JSON must contain a $type property to determine the concrete type.
|
| static object | DeserializeFromFile (string filePath) |
| | Deserializes a JSON file to a vehicle or component declaration object.
|
Provides JSON serialization and deserialization utilities for VECTO vehicle and component declarations. Handles type information, schema references, and specialized converters for VECTO-specific patterns.
◆ Deserialize()
| object VectoInputManager.Core.JsonDeclarationUtils.Deserialize |
( |
string | json | ) |
|
|
inlinestatic |
Deserializes a JSON string to a vehicle or component declaration object. The JSON must contain a $type property to determine the concrete type.
- Parameters
-
| json | The JSON string to deserialize. |
- Returns
- The deserialized vehicle or component declaration object.
◆ DeserializeFromFile()
| object VectoInputManager.Core.JsonDeclarationUtils.DeserializeFromFile |
( |
string | filePath | ) |
|
|
inlinestatic |
Deserializes a JSON file to a vehicle or component declaration object.
- Parameters
-
| filePath | The source file path. |
- Returns
- The deserialized vehicle or component declaration object.
◆ Serialize()
| string VectoInputManager.Core.JsonDeclarationUtils.Serialize |
( |
object | obj, |
|
|
bool | addSchema ) |
|
inlinestatic |
Serializes a vehicle or component declaration to JSON format.
- Parameters
-
| obj | The vehicle or component declaration object to serialize. |
| addSchema | Whether to include a $schema property referencing the JSON schema URL. |
- Returns
- The JSON string representation.
- Exceptions
-
| ArgumentException | Thrown when obj is not a vehicle or component declaration. |
◆ SerializeToFile()
| void VectoInputManager.Core.JsonDeclarationUtils.SerializeToFile |
( |
object | obj, |
|
|
string | filePath, |
|
|
bool | addSchema ) |
|
inlinestatic |
Serializes a vehicle or component declaration to a JSON file.
- Parameters
-
| obj | The vehicle or component declaration object to serialize. |
| filePath | The target file path. |
| addSchema | Whether to include a $schema property referencing the JSON schema URL. |
The documentation for this class was generated from the following file:
- VectoInputManagerCore/Json/JsonDeclarationUtils.cs