Comments (9)
Can you please provide an example of the input and the expected output ?
from json2csharpcodegenerator.
Input:
{ "count":1, "id":19863, "System.CreatedDate":"2020-11-16T21:41:02.7Z" }
Expected output:
using System;
using System.Text.Json.Serialization;
namespace Automation.Entities.Microsoft.WorkItemBacklogs{
public class Root {
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("System.CreatedDate")]
public DateTime SystemCreatedDate { get; set; }
}
}
Reveiced output:
using System.Text.Json.Serialization;
namespace Automation.Entities.Microsoft.WorkItemBacklogs{
public class Root {
[JsonPropertyName("count")]
public int Count { get; set; }
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("System.CreatedDate")]
public DateTime SystemCreatedDate { get; set; }
}
}
Configuration:
- Use Pascal Case
- Add JsonProperty Attributes
- Use Fields
- Use JsonPropertyName (.NET Core)
from json2csharpcodegenerator.
Thinking of adding an "Add using statements" option which will add any necessary using statements
from json2csharpcodegenerator.
It's a good idea, If I can help with something else, codinging, testing, just let me know.
Thank you for your time.
from json2csharpcodegenerator.
Oh snap now i got it, you meant when you zipped the classes as files it didn't add the system namespace right ? if this is the case its an easy fix
from json2csharpcodegenerator.
Yes! When the file is zipped happens this behavior
from json2csharpcodegenerator.
check again should be fixed
from json2csharpcodegenerator.
Worked as expected!
Thank you!
from json2csharpcodegenerator.
I will close this issue, if anything ill reopen, and thanks for letting me know
from json2csharpcodegenerator.
Related Issues (20)
- Не видно рекламу на сайте HOT 1
- [Feature Request] JSON Schema suppport HOT 1
- Better Options
- 'Use Nullable Types' flag doesn't work
- C# > JSON HOT 1
- Json > Python bool does not work
- convert a jSON array. Incorrect deserialize documentation. JSON->C# HOT 2
- Json to C# does not suggest the GUID type properly. HOT 1
- Generate json to python issue
- Dark mode HOT 1
- It would be great if it added references to the created class. HOT 1
- Getting error while converting json to python HOT 1
- Some C# classes created from Json have invalid name HOT 1
- bools dont work HOT 2
- Classes aren't in correct order after generation
- Unable to convert JSON to python classes HOT 1
- Converting issue - JSON to Dart HOT 1
- [JSON to POJO] add possibilty to make fileds private by default
- Python does not support Null Values: Convert JSON to Python Classes Online HOT 2
- Json -> Dart
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json2csharpcodegenerator.