code: def do_decode(cls, obj, obj_type):
          # type: (Any, ConjureTypeType) -> Any
          
          if inspect.isclass(obj_type) and issubclass(  # type: ignore
                  obj_type, ConjureBeanType
          ):
              return cls.decode_conjure_bean_type(obj, obj_type)  # type: ignore
  
          elif inspect.isclass(obj_type) and issubclass(  # type: ignore
                  obj_type, ConjureUnionType
          ):
              return cls.decode_conjure_union_type(obj, obj_type)
  
          elif inspect.isclass(obj_type) and issubclass(  # type: ignore
                  obj_type, ConjureEnumType
          ):
              return cls.decode_conjure_enum_type(obj, obj_type)
  
          elif isinstance(obj_type, DictType):
              return cls.decode_dict(obj, obj_type.key_type, obj_type.value_type)
  
          elif isinstance(obj_type, ListType):
              return cls.decode_list(obj, obj_type.item_type)
  
          elif isinstance(obj_type, OptionalType):
              return cls.decode_optional(obj, obj_type.item_type)
  
          return cls.decode_primitive(obj, obj_type)
docs: Decodes json into the specified type
  
          Args:
              obj: the json object to decode
              element_type: a class object which is the type we're decoding into.