An open API service indexing awesome lists of open source software.

https://github.com/andriysvyryd/csharpscriptserializer

Generates C# Script for constructing the given object
https://github.com/andriysvyryd/csharpscriptserializer

csharp csharp-script net-core roslyn scripting serialization

Last synced: 7 months ago
JSON representation

Generates C# Script for constructing the given object

Awesome Lists containing this project

README

          

# CSharpScriptSerializer
A library that generates C# scripts that can be used to construct the given object:

```C#
var input = new Point {X = 1, Y = 1};
var script = CSScriptSerializer.Serialize(input);
var output = CSScriptSerializer.Deserialize(script);
```

Here `script` is equal to `"new Point {X = 1, Y = 1}"`

See [RoundTrippingTest.cs](https://github.com/AndriySvyryd/CSharpScriptSerializer/blob/dev/test/CSharpScriptSerializer.Tests/RoundTrippingTest.cs) for more examples.

Get it from [NuGet](https://www.nuget.org/packages/CSharpScriptSerializer/).