Class: Anthropic::Helpers::InputSchema::ParsedJson Abstract
- Inherits:
-
Internal::Type::Unknown
- Object
- Internal::Type::Unknown
- Anthropic::Helpers::InputSchema::ParsedJson
- Defined in:
- lib/anthropic/helpers/input_schema/parsed_json.rb
Overview
This class is abstract.
Like Anthropic::Internal::Type::Unknown, but for parsed JSON values, which can be incomplete or malformed.
Class Method Summary collapse
-
.coerce(value, state:) ⇒ Object
private
No coercion needed for Unknown type.
Methods inherited from Internal::Type::Unknown
==, ===, dump, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Class Method Details
.coerce(value, state:) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
No coercion needed for Unknown type.
30 31 32 33 34 |
# File 'lib/anthropic/helpers/input_schema/parsed_json.rb', line 30 def coerce(value, state:) (state[:error] = value) if value.is_a?(StandardError) super end |