class_docstr: Test Public Streamlit Public APIs.
class_docstr_tok: ["Test","Public","Streamlit","Public","APIs","."]
docstr: Test st.json.
docstr_tok: ["Test","st.json","."]
code: def test_st_json(self):
      """Test st.json."""
      st.json('{"some": "json"}')
  
      el = self.get_delta_from_queue().new_element
      self.assertEqual(el.json.body, '{"some": "json"}')
  
      # Test that an object containing non-json-friendly keys can still
      # be displayed.  Resultant json body will be missing those keys.
  
      n = np.array([1, 2, 3, 4, 5])
      data = {n[0]: "this key will not render as JSON", "array": n}
      st.json(data)
  
      el = self.get_delta_from_queue().new_element
      self.assertEqual(
          el.json.body, '{"array": "array([1, 2, 3, 4, 5])"}'
      )
  
imports: import numpy
  import streamlit
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 1 for calling the StJsonAPITest obj's underlying member method code with example usage: obj.test_st_json() without return types