Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document compatibility with standard play JSON #44

Open
eeasley-coursera opened this issue Aug 1, 2017 · 0 comments
Open

Document compatibility with standard play JSON #44

eeasley-coursera opened this issue Aug 1, 2017 · 0 comments

Comments

@eeasley-coursera
Copy link

For classes where these libraries overlap, does play-json-extensions produce and read the same output as play-json? Is it supposed to?

e.g.

case class Foo(bar: String, baz: Int)
object Foo {
  val jsonFormat: OFormat[Foo] = Json.format[Foo]
  val jsonxFormat: OFormat[Foo] = Jsonx.formatCaseClassUseDefaults[Foo]
  val foo: Foo = Foo("ab", 1)
  val fooVal: JsValue = ...
  assert(jsonFormat.writes(foo) == jsonxFormat.writes(foo))
  assert(jsonFormat.reads(foo) == jsonxFormat.reads(foo))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant