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

Include how to parse JSON, and where the val json comes from. Fixes #… #6545

Closed
wants to merge 1 commit into from

Conversation

graingert
Copy link
Contributor

@graingert graingert commented Sep 12, 2016

Pull Request Checklist

  • Have you read How to write the perfect pull request?
  • Have you read through the contributor guidelines?
  • Have you signed the Lightbend CLA?
  • Have you [squashed your commits]? (Optional, but makes merge messages nicer.)
  • Have you added copyright headers to new files?
  • Have you checked that both Scala and Java APIs are updated?
  • Have you updated the documentation for both Scala and Java sections?
  • Have you added tests for any changed functionality?

Helpful things

Fixes

Fixes #6540

Purpose

Include how to parse JSON, and where the val json comes from, in the JsonTransformer docs

…6540

@schmitch
Copy link
Contributor

I'm not sure about the change. I would keep the Json as is and a note below in a second snippet on how to get the raw json to a JsValue.

@graingert
Copy link
Contributor Author

Not sure about that. The JSON seems to stand on its own and unrelated to the rest of the documentation

@schmitch
Copy link
Contributor

schmitch commented Sep 12, 2016

Actually it's just the example Json (and not any parsed value) which will be used in the examples. The Json Transfomers is actually a more advacned use case and if you are at that page you should've probably understood the previous pages and know how to get a parsed JsValue from Json. Also the text clearly says what it is "in the samples below we use that json"

@graingert
Copy link
Contributor Author

Sure, but it's unclear. I got confused. It would be much better to refer to ’that json’ by an actual val.

Ideally I'd like to be able to paste the examples into my Scala repl and have them 'just work'

@cchantep
Copy link
Member

cchantep commented Sep 12, 2016

@graingert as indicated previously, the way to parse a String as JsValue is explained in the first example of the JSON documentation, which is recommanded to get started (for this reason and others) before going on with more advanced usages. So before submitting such PR, please discuss it on the MailingList to figure out if/how a change could be useful. Best regards.

@cchantep cchantep closed this Sep 12, 2016
@AkashicSeer
Copy link

too bad they didn't listen to this guy and people like him. This seems to be the mentality too often. I'm over it.

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

Successfully merging this pull request may close these issues.

Scala JsonTransformers do not work as documented
4 participants