-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 native viewing support for jsonl/ndjson #14460
Conversation
Thanks for making a pull request to jupyterlab! |
Thanks @timkpaine I targeted this to 4.0.0 to discuss on Wednesday weekly call to see if we accept this as late addition (we have release RC so no promise). Otherwise it will need to move on 4.1.0. |
@@ -23,6 +23,12 @@ const CSS_CLASS = 'jp-RenderedJSON'; | |||
* The MIME type for JSON. | |||
*/ | |||
export const MIME_TYPE = 'application/json'; | |||
// NOTE: not standardized yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we delay merging this PR until 4.1, is there a chance these would be standardized by then, or is it not worth waiting for it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not worth waiting, i doubt this will be standardized soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I am working on helping to standardize application/jsonl
MIME_TYPE, but I have no experience in doing so, so I confirm it will take me a bit of time to write the RFC and submit it, so it's not worth waiting.
The consensus at the dev meeting was too push this to 4.1.0 |
I'll rebase this PR on |
…to existing json functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @timkpaine
References
jsonlines
/ndjson
have traction (some examples lazily collected from the web, shopify, duckdb).Since the differences are very trivial wrt existing
json
support, it isn't really worth it to defer this functionality to e.g. a community extension.Code changes
Register
jsonl
andndjson
file types, and corresponding mime types. NOTE: standardization is trailing utilization, so it is messier than one would prefer.ndjson/ndjson-spec#35
wardi/jsonlines#22
Then tweak the JSON extension to convert
jsonl
tojson
when the mime type is that ofjsonl
.User-facing changes
.jsonl
and.ndjson
files will now appear asjson
files and open in the default json opener.Backwards-incompatible changes
None. May effect existing mime render extensions for
jsonl
andndjson
, if these exist.