Json2CSharp / Json2CSharpCodeGenerator

Microsoft Reciprocal License
292 stars 81 forks source link

fixing issue #57, and possible fix for #74 #79

Closed marblekirby closed 2 years ago

marblekirby commented 2 years ago

Few changes in this PR

This is my first PR to this repository, happy to pick up more issues if you are happy with thes commits

Large number of files is due to Humanizer, which can support pluralization in many languages, and provides better(?) pluralization than the System.Data.Entity.Design.PluralizationServices.dll - https://github.com/Humanizr/Humanizer. Happy to discuss about this

Fix for issue #57 - see Test_20_ROOT_ARRAY

If first token is array, then we will write a different deserialization message This has been implemented for csharp and POJO (doesnt apply to python)

Potiental improvement related to issue #74 - see Test_19_PLURAL_NAMES

Updated to use Humanizer for pluralization Previously: openCloses -> openClos Now: openCloses -> openClose

Fixed csharp create test ps1 script

Previously this script generated a file that looks like:

image

Now the script generates a file with better formatting: image

marblekirby commented 2 years ago

@Json2CSharp looks like my visual studio has reformatted the codebase to meet my linting standards - will fix

Json2CSharp commented 2 years ago

thanks @marblekirby for your contribution ! I'll check them now

Json2CSharp commented 2 years ago

This looks good, I will merge it, yo dm me your paypal so i can give some coffee money

marblekirby commented 2 years ago

@Json2CSharp I don't see anyway to direct message you on here. Just happy to help out since I use the tool quite often!