VJson 0.7.0
See the version list below for details.
dotnet add package VJson --version 0.7.0
NuGet\Install-Package VJson -Version 0.7.0
<PackageReference Include="VJson" Version="0.7.0" />
paket add VJson --version 0.7.0
#r "nuget: VJson, 0.7.0"
// Install VJson as a Cake Addin #addin nuget:?package=VJson&version=0.7.0 // Install VJson as a Cake Tool #tool nuget:?package=VJson&version=0.7.0
VJson 🍣
A JSON serializer/deserializer library written in pure C#.
VJson
is a JSON serializer/deserializer (with JsonSchema support) library written in pure C#. Supported versions are .NET Framework 3.5
and .NET Standard 1.6
or higher.
This library is developed as a purely C# project, however it also supports that be build with Unity 5.6.3f1
or higher.
Installation
For standard C# projects
You can use Nuget/VJson.
dotnet add package VJson
For Unity projects
(TODO: Provide unity packages)
Usage example
Serialize/Deserialize
//
// For serialization
//
var serializer = new VJson.JsonSerializer(typeof(int));
// You can get JSON strings,
var json = serializer.Serialize(42);
// OR write json data(UTF-8) to streams directly.
using (var s = new MemoryStream())
{
serializer.Serialize(s, 42);
}
//
// For deserialization
//
var serializer = new VJson.JsonSerializer(typeof(int));
// You can get Object from strings,
var value = serializer.Deserialize(json);
// OR read json data(UTF-8) from streams directly.
using (var s = new MemoryStream(Encoding.UTF8.GetBytes(json)))
{
var value = serializer.Deserialize(s);
}
VJson
supports serializing/deserializing of some System.Collections(.Generics)
below,
- List<T>
- Dictionary<string, T>
- Array
and User defined classes. For user defined classes, only all public fields are supported.
e.g.
class SomeObject
{
private float _p = 3.14f; // A private field will not be exported.
public int X;
public string Y;
}
var obj = new SomeObject {
X = 10,
Y = "abab",
},
var serializer = new VJson.JsonSerializer(typeof(SomeObject));
var json = serializer.Serialize(obj);
// > {"X":10,"Y":"abab"}
var v = serializer.Deserialize("{\"X\":10,\"Y\":\"abab\"}");
// > v becomes same as obj.
Attributes
JSON Schema and validation
VJson
supports JSON Schema draft7.
(TODO: Write examples)
Attributes
(TODO: Write examples)
Other use cases are available at here.
Tasks
- Performance tuning
License
Boost Software License - Version 1.0
References
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.6 is compatible. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net35 is compatible. net40 was computed. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 3.5
- No dependencies.
-
.NETFramework 4.5
- No dependencies.
-
.NETStandard 1.6
- NETStandard.Library (>= 1.6.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on VJson:
Package | Downloads |
---|---|
VGltf
A glTF and GLB serializer/deserializer library written in pure C#. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.9.12 | 429 | 11/14/2022 |
0.9.11 | 427 | 6/14/2022 |
0.9.10 | 4,780 | 10/17/2021 |
0.9.9 | 334 | 10/16/2021 |
0.9.8 | 323 | 10/4/2021 |
0.9.7 | 349 | 10/3/2021 |
0.9.6 | 339 | 10/2/2021 |
0.9.5 | 1,357 | 9/30/2021 |
0.9.2 | 438 | 5/1/2021 |
0.9.0 | 304 | 3/25/2021 |
0.8.0 | 2,578 | 7/11/2019 |
0.7.5 | 1,283 | 3/7/2019 |
0.7.4 | 556 | 3/7/2019 |
0.7.3 | 551 | 3/7/2019 |
0.7.2 | 778 | 3/5/2019 |
0.7.1 | 567 | 3/5/2019 |
0.7.0 | 558 | 3/3/2019 |
0.6.1 | 600 | 2/28/2019 |
0.6.0 | 560 | 2/25/2019 |
0.5.0 | 549 | 2/25/2019 |
0.4.0 | 574 | 2/24/2019 |
0.3.0 | 617 | 2/23/2019 |
0.2.0 | 643 | 2/19/2019 |
0.1.1 | 631 | 2/17/2019 |
0.1.0 | 615 | 2/17/2019 |