json2caseclass icon indicating copy to clipboard operation
json2caseclass copied to clipboard

Generated code does not compile if member name is "type"

Open sscarduzio opened this issue 9 years ago • 2 comments

Type is a reserved word in Scala, if you try to generate a case class for something like: {"type": "a"} it will not compile.

Solution: generate case class code with back ticks, like: type

sscarduzio avatar Nov 06 '14 18:11 sscarduzio

Just pushed a PR for this

pierre-borckmans avatar Nov 24 '14 20:11 pierre-borckmans

As said @pierre-borckmans, related to #6

guizmaii avatar Jan 25 '16 17:01 guizmaii