code: def testJson(self):
      hparams = hparam.HParams(aaa=1, b=2.0, c_c="relu6", d=True)
      self.assertDictEqual(
          {"aaa": 1, "b": 2.0, "c_c": "relu6", "d": True},
          hparams.values(),
      )
      self.assertEqual(1, hparams.aaa)
      self.assertEqual(2.0, hparams.b)
      self.assertEqual("relu6", hparams.c_c)
      hparams.parse_json(
          '{"aaa": 12, "b": 3.0, "c_c": "relu4", "d": false}'
      )
      self.assertDictEqual(
          {"aaa": 12, "b": 3.0, "c_c": "relu4", "d": False},
          hparams.values(),
      )
      self.assertEqual(12, hparams.aaa)
      self.assertEqual(3.0, hparams.b)
      self.assertEqual("relu4", hparams.c_c)
  
      json_str = hparams.to_json()
      hparams2 = hparam.HParams(aaa=10, b=20.0, c_c="hello", d=False)
      hparams2.parse_json(json_str)
      self.assertEqual(12, hparams2.aaa)
      self.assertEqual(3.0, hparams2.b)
      self.assertEqual("relu4", hparams2.c_c)
      self.assertEqual(False, hparams2.d)
  
      hparams3 = hparam.HParams(aaa=123)
      self.assertEqual('{"aaa": 123}', hparams3.to_json())
      self.assertEqual('{\n  "aaa": 123\n}', hparams3.to_json(indent=2))
      self.assertEqual(
          '{"aaa"=123}', hparams3.to_json(separators=(";", "="))
      )
  
      hparams4 = hparam.HParams(aaa=123, b="hello", c_c=False)
      self.assertEqual(
          '{"aaa": 123, "b": "hello", "c_c": false}',
          hparams4.to_json(sort_keys=True),
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensor2tensor.utils import hparam
  import tensorflow.compat.v1
label_desc: Use image node_id 27 for calling the HParamsTest obj's underlying member method code with example usage: obj.testJson() without return types