question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

st.json collapse parameter

See original GitHub issue

(Note, you don’t have to fill out every section here. They’re just here for guidance. That said, nicely detailed feature requests are more likely to get eng attention sooner)

Problem

Have a parameter for st.json(body, collapse) where the default is False but you can set it to True. This would allow developers to choose if the json file is expanded or collapsed when rendered on the Streamlit app.

Requested by a community member, link to forum post: https://discuss.streamlit.io/t/json-collapse-option/17159

Solution

MVP: a parameter to set the view of a json file on the first render in Streamlit

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:13
  • Comments:11

github_iconTop GitHub Comments

8reactions
archilkcommented, Oct 19, 2021

@vdonato Awesome, will attempt it in the coming weekend. I’m a newbie though so please bear with me.

2reactions
dhirajsuvarnacommented, Jun 21, 2022

Though this feature has been implemented, I feel that its work half done, since this option collapses each and every node of the json file. Can this feature be modified to collapse only the root node or provide the name of the node to colapse?

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON collapse option - Using Streamlit
json () function accept a collapse=True argument to collapse values that are objects. For example: Show { “names” : [“Amber”, “Simone”, “Paul”] }....
Read more >
Emacs program to collapse Json to single line - Stack Overflow
Now, I'm looking for the reverse operation: given a nicely formatted Json object, collapse it into a single string.
Read more >
Collapse potential - St Louis | ArcGIS Hub
Collapse potential - St Louis. Create a query URL from the available options to get a JSON response. See our full REST API...
Read more >
Json Macro
The JSON macro can parse a JSON string. It exposes properties to query the resulting object and methods to modify it. Collapse image...
Read more >
SQL/JSON Function JSON_TABLE - Oracle Help Center
For FORMAT JSON you can override the default wrapping behavior by adding an explicit wrapper clause. You can override the default error handling...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found