VECTO Input Manager
Loading...
Searching...
No Matches
VectoInputManager.Core.JsonDeclarationUtils Class Reference

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 Public Member Functions

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.

Detailed Description

Provides JSON serialization and deserialization utilities for VECTO vehicle and component declarations. Handles type information, schema references, and specialized converters for VECTO-specific patterns.

Member Function Documentation

◆ 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
jsonThe 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
filePathThe 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
objThe vehicle or component declaration object to serialize.
addSchemaWhether to include a $schema property referencing the JSON schema URL.
Returns
The JSON string representation.
Exceptions
ArgumentExceptionThrown 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
objThe vehicle or component declaration object to serialize.
filePathThe target file path.
addSchemaWhether 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