KageKirin/Unity.Mathematics.Text.Json

System.Text.Json serialization for Unity.Mathematics types

โ˜… 1Forks 0C#GitHub โ†—Compare

README

Logo Unity.Mathematics.Text.Json

This project provides JSON serialization for Unity.Mathematics types based on System.Text.Json.

โšก tl;dr or I just want to fetch the correct dependency

dotnet CLI

dotnet add package UnityMathematics.Text.Json --version x.y.z

PackageVersion in Directory.Packages.props

  <ItemGroup>
    <PackageVersion Include="UnityMathematics.Text.Json" Version="x.y.z" />
  </ItemGroup>

PackageReference in Project .csproj

  <ItemGroup Label="dependencies">
    <PackageReference Include="UnityMathematics.Text.Json" />
  </ItemGroup>

๐Ÿ”ง JSON Serializer usage

TBD once implementation is added.

๐Ÿค Collaborate with My Project

PRs are welcome.
Please refer to COLLABORATION.md for more details.

๐Ÿ“ฆ Package overview

Unity.Mathematics.Text.Json Logo Unity.Mathematics.Text.Json itself

This is the main package, supporting both array and object notation, at the expense of a slightly more convoluted design.

If your requirement is to only support a single notation style, the following standalone packages might be what you want.

Unity.Mathematics.Text.Json.ArrayNotation Logo Unity.Mathematics.Text.Json.ArrayNotation

The package for using only JSON Array notation, as in the example below.

{
  "vector": [1.43, 2.09, 43.9]
}

Unity.Mathematics.Text.Json.ObjectNotation Logo Unity.Mathematics.Text.Json.ObjectNotation

The package for using only JSON Object notation, as in the example below.

{
  "vector": {
    "x": 1.43,
    "y": 2.09,
    "z": 43.9
  }
}

Contributors

KageKirin

Issues