JsonToKotlinClass icon indicating copy to clipboard operation
JsonToKotlinClass copied to clipboard

Keep conflicting properties when generating code

Open TedZen opened this issue 5 years ago • 3 comments

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 avatar Aug 21 '19 10:08 TedZen

@TedZen Should this error be alerted to user before generating code?

Karthik2007 avatar Aug 22 '19 14:08 Karthik2007

@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 :)

TedZen avatar Aug 22 '19 15:08 TedZen

@Karthik2007 I suggest AFTER way, cause BEFORE way involves many factors like the UI and UX, and that takes you some time :grin:

TedZen avatar Aug 22 '19 15:08 TedZen