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

Add more JSON utilities #27

Merged
merged 2 commits into from
May 23, 2020
Merged

Add more JSON utilities #27

merged 2 commits into from
May 23, 2020

Conversation

satabin
Copy link
Member

@satabin satabin commented May 19, 2020

In order to make the full roundtrip, this adds:

  • pretty/compact printing of Json streams
  • tokenizing ASTs

This operation is the counterpart of `values`
@satabin satabin added enhancement New feature or request json labels May 19, 2020
@satabin satabin requested a review from ybasket May 19, 2020 22:35

private def jsonString(s: String, key: Boolean): Unit = {
@tailrec
def loop(idx: Int): Unit =
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ybasket I also fixed escaping, but for the sake of "you never know what you do on a Saturday morning, so better safe than sorry", can you quickly check this new version?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also Saturday morning for me ;)

But looks all reasonable!

@satabin satabin force-pushed the json/more-utilities branch 2 times, most recently from 18ca2ee to 6fa023c Compare May 23, 2020 08:57
json/src/fs2/data/json/package.scala Outdated Show resolved Hide resolved

private def jsonString(s: String, key: Boolean): Unit = {
@tailrec
def loop(idx: Int): Unit =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also Saturday morning for me ;)

But looks all reasonable!

It comes in two flavors:
 - pipes emitting rendered string chunks
 - collectors accumulating all rendered values in one string.
@satabin satabin merged commit 50b832f into master May 23, 2020
@satabin satabin deleted the json/more-utilities branch May 23, 2020 09:53
@satabin satabin added this to the 0.7.0 milestone Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request json
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants