code: def test_json_encoder(self):
      self.assertEqual(
          json.dumps(
              frozendict({"foo": "bar"}), cls=hl.utils.JSONEncoder
          ),
          '{"foo": "bar"}',
      )
  
      self.assertEqual(
          json.dumps(Struct(foo="bar"), cls=hl.utils.JSONEncoder),
          '{"foo": "bar"}',
      )
  
      self.assertEqual(
          json.dumps(
              Interval(start=1, end=10), cls=hl.utils.JSONEncoder
          ),
          '{"start": 1, "end": 10, "includes_start": true, "includes_end": false}',
      )
  
      self.assertEqual(
          json.dumps(
              hl.Locus(1, 100, "GRCh38"), cls=hl.utils.JSONEncoder
          ),
          '{"contig": "1", "position": 100, "reference_genome": "GRCh38"}',
      )
  
imports: import json
  import unittest
  import hail
  from hail.utils import *
  from hail.utils.misc import escape_str, escape_id
  from hail.utils.java import FatalError
  from hail.utils.linkedlist import LinkedList
  from ..helpers import *
label_desc: Use image node_id 25 for calling the Tests obj's underlying member method code with example usage: obj.test_json_encoder() without return types