Package groovy.json

# Class JsonException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
groovy.json.JsonException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `Exceptions.JsonInternalException`

public class JsonException extends RuntimeException
`JsonException` is the exception thrown by the JSON builder and slurper classes, whenever a problem occurs when creating or parsing JSON data structures.

Since:
  1.8.0
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JsonException()`
  Creates a `JsonException` with no detail message.
  `JsonException(String s)`
  Creates a `JsonException` with the supplied detail message.
  `JsonException(String s, Throwable throwable)`
  Creates a `JsonException` with the supplied detail message and cause.
  `JsonException(Throwable throwable)`
  Creates a `JsonException` with the supplied cause.

- ## Method Summary

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### JsonException

    public JsonException()
    Creates a `JsonException` with no detail message.

  - ### JsonException

    public JsonException(String s)
    Creates a `JsonException` with the supplied detail message.
    Parameters:
      `s` - the detail message

  - ### JsonException

    public JsonException(String s, Throwable throwable)
    Creates a `JsonException` with the supplied detail message and cause.
    Parameters:
      `s` - the detail message
      `throwable` - the cause

  - ### JsonException

    public JsonException(Throwable throwable)
    Creates a `JsonException` with the supplied cause.
    Parameters:
      `throwable` - the cause