GithubHelp home page GithubHelp logo

Comments (9)

Json2CSharp avatar Json2CSharp commented on July 24, 2024

Can you please provide an example of the input and the expected output ?

from json2csharpcodegenerator.

luizgserpa avatar luizgserpa commented on July 24, 2024

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.

Json2CSharp avatar Json2CSharp commented on July 24, 2024

Thinking of adding an "Add using statements" option which will add any necessary using statements

from json2csharpcodegenerator.

luizgserpa avatar luizgserpa commented on July 24, 2024

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.

Json2CSharp avatar Json2CSharp commented on July 24, 2024

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.

luizgserpa avatar luizgserpa commented on July 24, 2024

Yes! When the file is zipped happens this behavior

from json2csharpcodegenerator.

Json2CSharp avatar Json2CSharp commented on July 24, 2024

check again should be fixed

from json2csharpcodegenerator.

luizgserpa avatar luizgserpa commented on July 24, 2024

Worked as expected!
Thank you!

from json2csharpcodegenerator.

Json2CSharp avatar Json2CSharp commented on July 24, 2024

I will close this issue, if anything ill reopen, and thanks for letting me know

from json2csharpcodegenerator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.