class_docstr: JSONEncoder that supports some Hail types.
class_docstr_tok: ["JSONEncoder","that","supports","some","Hail","types","."]
code: def default(self, o: Any):
      if isinstance(o, (frozendict, Struct)):
          return dict(o)
      if isinstance(o, Interval):
          return {
              "start": o.start,
              "end": o.end,
              "includes_start": o.includes_start,
              "includes_end": o.includes_end,
          }
      if isinstance(o, Locus):
          return {
              "contig": o.contig,
              "position": o.position,
              "reference_genome": o.reference_genome,
          }
      if isinstance(o, ReferenceGenome):
          return o.name
      if isinstance(o, np.integer):
          return int(o)
      if isinstance(o, np.floating):
          return float(o)
      if o is pd.NA:
          return None
      return super().default(o)
  
file_path: hail/hail/python/hail/utils/jsonx.py
imports: from typing import Any
  import json
  import numpy
  import pandas
  from .frozendict import frozendict
  from .struct import Struct
  from .interval import Interval
  from ..genetics.locus import Locus
  from ..genetics.reference_genome import ReferenceGenome
  from .misc import escape_str
label_desc: Use image node_id 1 for calling the JSONEncoder obj's underlying member method code with example usage: obj.default(o) and returns: super, dict, dict, dict, o, int, float, None