Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 906 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 906 Bytes

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 in C#.

Join the chat at https://gitter.im/publiclab/publiclab NuGet

PM> Install-Package Protobuf.Text

How to use:

// 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<T>(config);

Related issue on Protobuf repo.