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

Update JSON encoder to provide line delimited JSON #175

Open
dlindhol opened this issue Dec 15, 2020 · 1 comment
Open

Update JSON encoder to provide line delimited JSON #175

dlindhol opened this issue Dec 15, 2020 · 1 comment

Comments

@dlindhol
Copy link
Member

The current JsonEncoder represents each Sample (of an uncurried dataset) as a JSON array. The resulting dataset encoding is thus a sequence of JSON arrays with no delimiter. This ticket is to align this output option with line delimited JSON.

  • Add a newline (\n) to each encoded sample
  • Change the name of the encoder. JsonLinesEncoder?
  • Change the suffix for service requests to "jsonl" (which we prefer over "ndjson" and "ldjson").
  • Change the media type in the response header. Of the various flavors of line delimited JSON, the only one to specify a media type is application/x-ndjson. However, there are cases of "application/jsonl" in the wild.
@lindholc
Copy link
Member

See #179.

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