play.api.json.protocol
if the object has a single field and is not @strict, it is transformed into a value. With strict it is still an object
@protocol.io case class Foo( value: String )
Foo( "something" ) transformed to JSON produces JsString( "something" )
Foo( "something" )
JsString( "something" )
@protocol.io @protocol.strict case class Foo( value: String )
Foo( "something" ) transformed to JSON produces {"value":"something"}
{"value":"something"}
if the object has a single field and is not @strict, it is transformed into a value. With strict it is still an object
Non-strict example
Foo( "something" )
transformed to JSON producesJsString( "something" )
Strict example
Foo( "something" )
transformed to JSON produces{"value":"something"}