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
- Host: GitHub
- URL: https://github.com/andriysvyryd/csharpscriptserializer
- Owner: AndriySvyryd
- License: apache-2.0
- Created: 2016-10-28T23:10:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-08-14T22:24:37.000Z (over 1 year ago)
- Last Synced: 2025-06-18T04:44:51.950Z (8 months ago)
- Topics: csharp, csharp-script, net-core, roslyn, scripting, serialization
- Language: C#
- Size: 61.5 KB
- Stars: 21
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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/).