Table of Contents

Class SplineJsonConverter

Converts splines to JSON strings, and vice versa

public static class SplineJsonConverter
Inheritance
SplineJsonConverter

Methods

JsonToSerializedSplines(string)

Converts a JSON string to an array of instances of SerializedCurvySpline

public static SerializedCurvySpline[] JsonToSerializedSplines(string json)

Parameters

json string

The JSON to deserialize

Returns

SerializedCurvySpline[]

JsonToSpline(string, CurvySerializationSpace)

Converts a JSON string to a spline

public static CurvySpline JsonToSpline(string json, CurvySerializationSpace coordinatesSpace = CurvySerializationSpace.Global)

Parameters

json string

The JSON to deserialize

coordinatesSpace CurvySerializationSpace

How to interpret the coordinates in the JSON: local ones or global ones?

Returns

CurvySpline

JsonToSplines(string, CurvySerializationSpace)

Converts a JSON string to an array of splines

public static CurvySpline[] JsonToSplines(string json, CurvySerializationSpace coordinatesSpace = CurvySerializationSpace.Global)

Parameters

json string

The JSON to deserialize

coordinatesSpace CurvySerializationSpace

How to interpret the coordinates in the JSON: local ones or global ones?

Returns

CurvySpline[]

SplineToJson(CurvySpline, CurvySerializationSpace, bool)

Converts a spline to a JSON string

public static string SplineToJson(CurvySpline spline, CurvySerializationSpace coordinatesSpace = CurvySerializationSpace.Global, bool prettify = true)

Parameters

spline CurvySpline

The spline to serialize

coordinatesSpace CurvySerializationSpace

What coordinates of the spline should be serialized: local ones or global ones?

prettify bool

Set to true to make the JSON string easy to read. If false, the spline will be compacted to make it small

Returns

string

SplinesToJson(IEnumerable<CurvySpline>, CurvySerializationSpace, bool)

Converts splines to a JSON string

public static string SplinesToJson(IEnumerable<CurvySpline> splines, CurvySerializationSpace coordinatesSpace = CurvySerializationSpace.Global, bool prettify = true)

Parameters

splines IEnumerable<CurvySpline>

The splines to serialize

coordinatesSpace CurvySerializationSpace

What coordinates of the spline should be serialized: local ones or global ones?

prettify bool

Set to true to make the JSON string easy to read. If false, the spline will be compacted to make it small

Returns

string