code: def json_default(obj):
    
    for default in _JSON_DEFAULTS:
      if default[0](obj):
        return default[1](obj)
    raise TypeError(repr(obj) + " is not JSON serializable")
docs: Convert an object to JSON, via the defaults set with register_json_default.
  
    :obj: the object to convert