Using Jerkson version:
<dependency>
<groupId>com.cloudphysics</groupId>
<artifactId>jerkson_2.10</artifactId>
<version>0.6.3</version>
</dependency>
I have this case class:
case class Parameter(val name:String, val value:String, @(JsonProperty@field)("type") val aType:String, val restriction:String, val defaultValue:String, val required:Boolean, val description:String)
The Json ouptut contains a field named 'type'. Obviusly this is a problem in Scala as 'type' is a key word. Although it looks like JsonProperty sold be supported this seems to be broken.
In a test I have this code:
val p = Parameter("name", "value", "string", "restricted", "myDefault", true, "desc")
println(Json.generate(p))
It prints:
{"name":"name","value":"value","aType":"string","restriction":"restricted","defaultValue":"myDefault","required":true,"description":"desc"}
'aType' and not 'type'
Any ideas what am I doing wrong?