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

IPython.display.JSON object not rendered correctly #2106

Open
dchandan opened this issue Jan 26, 2024 · 2 comments
Open

IPython.display.JSON object not rendered correctly #2106

dchandan opened this issue Jan 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dchandan
Copy link

dchandan commented Jan 26, 2024

Describe the bug

context
I am using the IPython.display.JSON function to render JSON data in a Jupyter Notebook.

IPython.display.JSON(item.to_dict())

JupyterLab renders the data as:
Screenshot 2024-01-26 at 5 35 31 PM

The triangles allow one to collapse and expand the elements of the JSON structure.

expectation
I expected the same result in the finished Book.

bug
But instead the output cell is rendered as:
Screenshot 2024-01-26 at 5 36 58 PM

problem
How can I get the same interactive rendering of JSON data in the Book? Is this a bug?

Reproduce the bug

  1. Create a JupyterLab notebook.
  2. import IPython.display
  3. IPython.display.JSON({"a": {"b": {"c": "d"}}})

Should look like this in the notebook, and I would like it to look like this in the Book as well.
Screenshot 2024-01-26 at 5 43 24 PM

List your environment

No response

@dchandan dchandan added the bug Something isn't working label Jan 26, 2024
Copy link

welcome bot commented Jan 26, 2024

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@agoose77
Copy link
Collaborator

I think we can add a mime renderer for this. We'll need to see what client side libraries are required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants