JsonToKotlinClass
JsonToKotlinClass copied to clipboard
Keep conflicting properties when generating code
when generating code with json like {"a":1,"a":"","b":[{"c":1},{"c":""}]}, we should keep the conflicting properties like " val a:Int , val a:String " to alert user that there are errors in raw json string
@TedZen Should this error be alerted to user before generating code?
@TedZen Should this error be alerted to user before generating code?
@Karthik2007 That would be a better way if alert user before generating code, like marking errors with underline in red in our input field and disable generate button. the alternative way is keeping the conflict after code-gen and let user's IDE marking errors out. Both ways are good for us, it's up to you :)
@Karthik2007 I suggest AFTER way, cause BEFORE way involves many factors like the UI and UX, and that takes you some time :grin: