-1

I can't find an explanation in the Play Framework docs. I found this question but now I can't see why will I use Format[A] at all.

idan ahal
  • 707
  • 8
  • 21

1 Answers1

0

As Gaël mentioned: OFormat will only read/write JSON objects, but maybe you have some types that you want to read/write as JSON string/int/Boolean.

OFormat/OWrite returns a JsObject while Format/Write returns JsValue. You can do more with JsObject because it is a subclass of JsValue that represents a JSON object. JsValue can be a string, numeric, object or array.

idan ahal
  • 707
  • 8
  • 21