https://github.com/grumpybusted/grumpy.json
Extension Methods for Json
https://github.com/grumpybusted/grumpy.json
extension-methods json
Last synced: 4 months ago
JSON representation
Extension Methods for Json
- Host: GitHub
- URL: https://github.com/grumpybusted/grumpy.json
- Owner: GrumpyBusted
- License: mit
- Created: 2018-01-13T17:45:00.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T18:24:36.000Z (about 3 years ago)
- Last Synced: 2025-03-14T13:37:59.598Z (11 months ago)
- Topics: extension-methods, json
- Language: C#
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://ci.appveyor.com/project/GrumpyBusted/grumpy-json)
[](https://codecov.io/gh/GrumpyBusted/Grumpy.Json)
[](https://www.nuget.org/packages/Grumpy.Json/)
[](https://www.nuget.org/packages/Grumpy.Json/)
# Grumpy.Json
Extending the magnificent Newtonsoft.Json, with a few extension methods I always end up needing.
```csharp
public class TestPerson
{
public string Name { get; set; }
public int Age { get; set; }
}
const string str = "{\"Name\": \"MyName\", \"Age\": 200}";
var person = str.DeserializeFromJson();
person.Name.Should().Be("MyName");
person.Age.Should().Be(200);
var obj = new TestPerson
{
Name = "MyName",
Age = 200
};
var result = obj.SerializeToJson();
```