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

Support streaming of json-values (cntd.) #942

Merged
merged 2 commits into from
May 9, 2018

Conversation

2m
Copy link
Contributor

@2m 2m commented May 9, 2018

Continuation of #899

markusthoemmes and others added 2 commits May 9, 2018 11:23
This enables parsing a json-structure in a streaming way. It allows to pick the values wanted from the original structure via `JsonPath`, a notation to refer to a specific part of a json-structure.

It never reads the original value in memory entirely (unless that is required by the given json-path), but instead parses the incoming values in chunks. This is especially helpful when consuming APIs, which put the results you're interested in in some nested structure, which isn't simply streamable.

A common example would be:

```
{
  "rows": [...]
}
```

Where the application is only interested in the values contained in `rows`, preferably as they arrive (over a TCP stream for example).
Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

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

LGTM

@markusthoemmes
Copy link
Contributor

Sorry I didn't get to include the fixups in time 😞. Thanks for finishing up 👍

@ennru
Copy link
Member

ennru commented May 9, 2018

We'll release the Alpakka today - that's why we're pushing this a bit.

@2m
Copy link
Contributor Author

2m commented May 9, 2018

Yup. No problem at all. Thanks for all the work in the original PR!

@2m 2m merged commit 7107706 into akka:master May 9, 2018
@2m 2m deleted the markusthoemmes-json-parsing branch May 9, 2018 09:46
@ennru ennru added this to the 0.19 milestone May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants