JsonUtils
JsonUtils copied to clipboard
Added cli
I split some functions classes to support the use in a CLI
Main differences:
-
Split the generator function in a seperate dll ( core)
-
Changed the integer values of the programming languages to a Enum
-
Nest function changed somewhat, you could easily support a namespace now, if you change the view. The code from the web stays the same. In the background it checks the following
bool nest = ! String.IsNullOrEmpty(model.NameSpace);
Here's an example of the CLI
JsonUtils.CLI.exe -i "C:\Users\Nico\Downloads\JsonUtils\JsonUtils.AutoGen\bin\Debug\Example\JsonInput.json" -o "C:\Users\Nico\Downloads\JsonUtils\JsonUtils.AutoGen\bin\Debug\Example\JsonInput.cs" -n "theNamespace" -g "CSharp" -r "RootObject"
There is an unfinished test class for now, i will finish it later. But don't have the time right now. (it's unloaded fyi)
Merge if you are interested, the use case i'm going to use it for: Building a project with VS and converting some code automaticly, after i converted the CSharp class to json ;)
PS. I should mention i changed the samespace of JsonUtils to JsonUtils.Web, so if you are updating the web application. Make sure you delete JsonUtils.dll in the bin folder. Otherwhise the project could detect HomeController twice and give an error