code: def json_compat_obj_decode(data_type, obj, caller_permissions=None,
                             alias_validators=None, strict=True,
                             old_style=False, for_msgpack=False):
      
      decoder = PythonPrimitiveToStoneDecoder(caller_permissions,
          alias_validators, for_msgpack, old_style, strict)
  
      if isinstance(data_type, bv.Primitive):
          return decoder.make_stone_friendly(
              data_type, obj, True)
      else:
          return decoder.json_compat_obj_decode_helper(
              data_type, obj)
docs: Decodes a JSON-compatible object based on its data type into a
      representative Python object.
  
      Args:
          data_type (Validator): Validator for serialized_obj.
          obj: The JSON-compatible object to decode based on data_type.
          caller_permissions (list): The list of raw-string caller permissions
              with which to serialize.
          strict (bool): If strict, then unknown struct fields will raise an
              error, and unknown union variants will raise an error even if a
              catch all field is specified. See json_decode() for more.
  
      Returns:
          See json_decode().