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

Is there any support for or pathway to support unflattening json to scala objects? #3

Closed
DanielSank opened this issue Jan 10, 2016 · 2 comments

Comments

@DanielSank
Copy link

The readme shows

> case class Foo(a: String, b: Int)
> val foo = Foo("a", 1)
> implicit val fooFormat = Json.writes[Foo]
> json"{foo: $foo}"
res9: play.api.libs.json.JsValue = {"foo":{"a":"a","b":1}}

which is cool. What about the reverse direction?

@DanielSank
Copy link
Author

Seems like other projects already do this.

@maffoo
Copy link
Owner

maffoo commented Jan 25, 2016

jsonquote uses other libraries for the actual json implementations (currently supports play, spray and lift). This library makes it possible to use json literal notation to construct json ASTs defined by one of those libraries. For parsing strings into json or converting ASTs into other scala objects, you should just the facilities of the underlying library, like spray.

@maffoo maffoo closed this as completed Jan 25, 2016
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

2 participants