Table of Contents

Class JsonConverters.Vector2JsonConverter

Namespace
PAC.Extensions

Custom JSON converter for Vector2.

public class JsonConverters.Vector2JsonConverter : JsonConversion.JsonConverter<Vector2, JsonData.List>
Inheritance
JsonConverters.Vector2JsonConverter
Inherited Members

Methods

FromJson(List)

Attempts to convert the JSON data into a C# object of the given type.

NOTE: JsonConverter has a default implementation for an overload FromJson(JsonData jsonData) that ensures it is of type JsonDataType before calling the specific overload FromJSON(JsonDataType jsonData).

public override Vector2 FromJson(JsonData.List jsonData)

Parameters

jsonData JsonData.List

Returns

Vector2

ToJson(Vector2)

Attempts to convert the C# object into JSON data.

public override JsonData.List ToJson(Vector2 vec)

Parameters

vec Vector2

Returns

JsonData.List