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

documentation shows that sealedFormat includes "type" key #43

Open
graingert opened this issue Jul 6, 2017 · 2 comments
Open

documentation shows that sealedFormat includes "type" key #43

graingert opened this issue Jul 6, 2017 · 2 comments

Comments

@graingert
Copy link

Eg:

Json.parse("""{"i": 5, "s":"foo", "type": "X"}""").as[SomeAdt] == X(5,"foo")

but it's neither obeyed during parsing, nor included when formatting.

@bharatsingh-tc
Copy link

Facing the same issue, examples from the documentation are not working as intended. Type hints are not included within the Json generated by the library.

Here is a sample code for reproducing the bug with the latest version of play-json [2.6.9] and play-json-extensions [0.14.0]

@plokhotnyuk
Copy link

@Bharat1103 Try jsoniter-scala. It works exactly as you need with ADTs. Also, it is much safer and more efficient than Play-JSON.

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

3 participants