Skip to content

Commit 99d9e1a

Browse files
committed
Add initial docs
1 parent 294628f commit 99d9e1a

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,33 @@
1-
# System.Text.Json.Protobuf
1+
# System.Text.Json.Protobuf
2+
3+
This library provides support for Protobuf types to [System.Text.Json](https://www.nuget.org/packages/System.Text.Json/).
4+
5+
## Performance
6+
7+
``` ini
8+
BenchmarkDotNet=v0.13.1, OS=macOS Monterey 12.3 (21E230) [Darwin 21.4.0]
9+
Apple M1 Pro, 1 CPU, 10 logical and 10 physical cores
10+
.NET SDK=6.0.101
11+
[Host] : .NET 6.0.1 (6.0.121.56705), Arm64 RyuJIT
12+
DefaultJob : .NET 6.0.1 (6.0.121.56705), Arm64 RyuJIT
13+
```
14+
15+
### Simple message
16+
| Method | Mean | Error | StdDev |
17+
|--------------------------------------------- |----------:|----------:|----------:|
18+
| SystemTextJsonProtobufSupport | 2.572 μs | 0.0094 μs | 0.0074 μs |
19+
| NewtonsoftJsonWithProtobufParserAndFormatter | 17.250 μs | 0.1492 μs | 0.1395 μs |
20+
21+
22+
### Message with oneofs
23+
| Method | Mean | Error | StdDev |
24+
|--------------------------------------------- |----------:|----------:|----------:|
25+
| SystemTextJsonProtobufSupport | 3.115 μs | 0.0065 μs | 0.0057 μs |
26+
| NewtonsoftJsonWithProtobufParserAndFormatter | 18.384 μs | 0.0403 μs | 0.0377 μs |
27+
28+
29+
### Message with repeated fields
30+
| Method | Mean | Error | StdDev |
31+
|--------------------------------------------- |---------:|--------:|--------:|
32+
| SystemTextJsonProtobufSupport | 100.9 μs | 0.19 μs | 0.17 μs |
33+
| NewtonsoftJsonWithProtobufParserAndFormatter | 735.1 μs | 1.09 μs | 1.02 μs |

0 commit comments

Comments
 (0)