Skip to content

JSONL stream #39478

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

Closed
wants to merge 23 commits into from
Closed

JSONL stream #39478

wants to merge 23 commits into from

Conversation

kristapratico
Copy link
Member

@kristapratico kristapratico commented Jan 30, 2025

Part of #38806

Implements the design described in https://gist.github.com/kristapratico/d330af39962ea05b10384b865e37b36f

PR adds types for JSONL streaming, SSE will come later.

@kristapratico kristapratico changed the title Jsonl stream JSONL stream Jan 31, 2025
Copy link
Contributor

@iscai-msft iscai-msft left a comment

Choose a reason for hiding this comment

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

overall looks great, thanks @kristapratico !

@kristapratico kristapratico marked this pull request as ready for review February 5, 2025 21:48
Copy link
Member

@pvaneck pvaneck left a comment

Choose a reason for hiding this comment

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

Looks good to me. Can you also add a changelog entry?

def json(self) -> Any:
"""Parse the event data as JSON.

:return: The parsed JSON data.
Copy link
Member

Choose a reason for hiding this comment

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

I had to look up how json.load documents this (because "The parsed JSON data" is somewhat ambiguous and the return type hint isn't that helpful here :) and it says:

Deserialize fp to a Python object using the JSON-to-Python conversion table.

I think what we have here is more of an as_dict method.

But having that on the base EventType is probably wrong, because what if the event is not some form of structured data? E.g. SSE with just vanilla strings (and not json strings - which have to be quoted/escaped)

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed the EventTypes / assumptions of JSON being the only type of event data.

@kristapratico kristapratico requested a review from johanste March 5, 2025 00:01
Copy link

Hi @kristapratico. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label May 23, 2025
Copy link

Hi @kristapratico. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing /reopen if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

@github-actions github-actions bot closed this May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core.Http no-recent-activity There has been no recent activity on this issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants