/json-to-csharp-entity-class

Obsolete: quicktype as of https://github.com/quicktype/quicktype/pull/886/files provides similar functionality.

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

json-to-csharp-entity-class

npm version

A quicktype library that generates simple C# EntityClasses from JSON.

Example input:

{
    "text": "Example",
    "complete": true
}

Example output:

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 flexible as quicktype. Here is an example:

npm start -- "example/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.

Example Usage

npm install

npm install --only=dev

npm start example/comment.json