class

AI::Provider::JSONParseError

Inherits AI::Provider::AISDKError < Exception < Reference < Object

Error thrown when JSON parsing fails.

This error provides context about the text that failed to parse and the underlying parsing error.

Constructors

new(*, text : String, cause : Exception)

Creates a new JSONParseError.

Parameters:

  • text: The text that failed to parse
  • cause: The underlying parsing exception
Source

Class methods

instance?(error) : Bool

Checks if the given value is an instance of JSONParseError.

Source

Instance methods

text

The text that failed to parse as JSON.

Source