JSON collapse option

Hi,

Would it be possible to make the streamlit.json() function accept a collapse=True argument to collapse values that are objects.

For example:

Show
{
“names” : [“Amber”, “Simone”, “Paul”]
}

As
{
“names”: […]
}

When streamlit.json(body, collapse=True)

Thank you,

Francis

Hi @francisj!

First, welcome to the Streamlit community!!! :star_struck: :tada: :partying_face: :tada: :nerd_face:

This is a good suggestion! I wen’t ahead and made a feature request on GitHub for you, feel free to add anything I might have missed!

Happy Streamlit-ing!
Marisa

Amazing, thank you @Marisa_Smith !

I’ve really been enjoying streamlit so far. Great for prototyping and will soon test on small production use by an internal team.

Cheers!

1 Like