0.1.1 • Published 6 years ago
json-to-csharp-entity-class v0.1.1
json-to-csharp-entity-class
A quicktype library that generates simple C# EntityClasses from JSON.
Example input:
{
"text": "Example",
"complete": true
}
namespace QuickType
{
using System;
using System.Collections.Generic;
public partial class TestClass : EntityData
{
public string Text { get; set; }
public bool Complete { get; set; }
}
}
Because of the way this library was built, it is nearly as extensible as quicktype
. Here is an example:
npm start -- "comment.json" --namespace NewNamespace
These quicktype
options can be used all over the place! Check out the README for more examples that can be applied to this tool.
It has only been designed for the most basic types, so if you find a useful one that is missing please file a GitHub issue, or feel free to contribute a new feature!
Example Usage
npm install
npm install --only=dev
npm start comment.json