external.chris.kagekirin.helmich.unitymathematics.text.json.objectnotation
Version:
System.Text.Json serializers for Unity.Mathematics types, serializing data as objects
72 lines (49 loc) • 1.79 kB
Markdown
This project provides JSON serialization for Unity.Mathematics types
based on [System.Text.Json](https://learn.microsoft.com/en-us/dotnet/api/system.text.json?view=net-9.0).
```bash
dotnet add package UnityMathematics.Text.Json --version x.y.z
```
```xml
<ItemGroup>
<PackageVersion Include="UnityMathematics.Text.Json" Version="x.y.z" />
</ItemGroup>
```
```xml
<ItemGroup Label="dependencies">
<PackageReference Include="UnityMathematics.Text.Json" />
</ItemGroup>
```
TBD once implementation is added.
PRs are welcome.
Please refer to [COLLABORATION.md](./COLLABORATION.md) for more details.
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.
The package for using _only_ JSON Array notation, as in the example below.
```json
{
"vector": [1.43, 2.09, 43.9]
}
```
The package for using _only_ JSON Object notation, as in the example below.
```json
{
"vector": {
"x": 1.43,
"y": 2.09,
"z": 43.9
}
}
```