DotNetJ2Class 1.0.0
This lib helps you to create a class at runtime from a JSON. It means that you don't need to change your class every time a JSON that you consume has changed.
Install-Package DotNetJ2Class -Version 1.0.0
dotnet add package DotNetJ2Class --version 1.0.0
<PackageReference Include="DotNetJ2Class" Version="1.0.0" />
paket add DotNetJ2Class --version 1.0.0
#r "nuget: DotNetJ2Class, 1.0.0"
DotNet.J2Class
This lib helps you to create a class at runtime from a JSON. It means that you don't need to change your class every time a JSON that you consume has changed.
Installation
Use the package manager to install.
Install-Package DotNetJ2Class -Version 1.0.0
Usage
After install the package, add this code in your "using" block:
using DotNet.J2Class;
and
string json = "YOUR JSON";
//You can set a name
//for the class that will be created.
//If you don't pass any name,
//it will be create with DefaultName.
//The same happens with module name.
//Both parameters are optional.
string className = "CLASS_NAME";
string moduleName = "MODULE_NAME"
var myObject = J2Class.CreateObjectFromJson(json, className, moduleName);
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
DotNet.J2Class
This lib helps you to create a class at runtime from a JSON. It means that you don't need to change your class every time a JSON that you consume has changed.
Installation
Use the package manager to install.
Install-Package DotNetJ2Class -Version 1.0.0
Usage
After install the package, add this code in your "using" block:
using DotNet.J2Class;
and
string json = "YOUR JSON";
//You can set a name
//for the class that will be created.
//If you don't pass any name,
//it will be create with DefaultName.
//The same happens with module name.
//Both parameters are optional.
string className = "CLASS_NAME";
string moduleName = "MODULE_NAME"
var myObject = J2Class.CreateObjectFromJson(json, className, moduleName);
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Release Notes
Beta Version:
Now you can convert only simple JSON like "{Foo: barValue}". If you try to convert this kind of JSON "{'Foo': {Bar1: barValue, Bar2: bar2Value}}", it will fail.
Dependencies
-
.NETStandard 2.0
- JmesPath.Net (>= 1.0.125)
- Newtonsoft.Json (>= 12.0.3)
- System.Reflection.Emit (>= 4.7.0)
Used By
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version History
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 89 | 8/17/2020 |