https://github.com/scisharp/protobuf.text
Text format support for protobuf
https://github.com/scisharp/protobuf.text
Last synced: about 1 year ago
JSON representation
Text format support for protobuf
- Host: GitHub
- URL: https://github.com/scisharp/protobuf.text
- Owner: SciSharp
- License: apache-2.0
- Created: 2019-09-16T01:10:23.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-31T08:32:57.000Z (over 2 years ago)
- Last Synced: 2025-05-20T05:18:16.395Z (about 1 year ago)
- Language: C#
- Size: 493 KB
- Stars: 21
- Watchers: 4
- Forks: 10
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Google Protobuf for TextFormat
Protobuf is not supporting text-format in the Google.Protobuf C# implementation at this moment. This project provides text format support for [protobuf](https://github.com/protocolbuffers/protobuf) in C#.
[](https://gitter.im/sci-sharp/community) [](https://www.nuget.org/packages/Protobuf.Text)
```shell
PM> Install-Package Protobuf.Text
```
**How to use:**
```csharp
// parse from text
TestAllTypes parsedFromText = TestAllTypes.Parser.ParseText(text);
// serialize to text
var text = parsedFromText.ToText();
// config
var config = File.ReadAllText("PATH");
var parsed = TextParser.Default.Parse(config);
```
Related [issue](https://github.com/protocolbuffers/protobuf/issues/6654) on Protobuf repo.