JSONWriteException
classin packageklyn.io.json
public class JSONWriteException extends ValueException:
└ JSONWriteException

Reports a Klyn value that cannot be represented as JSON.

Serialization fails rather than producing an invalid or ambiguous document for cyclic graphs, non-finite floating-point values and object keys that collapse to the same JSON property name.

Example
import klyn.io.json

try:
JSON.stringify({"value": inf})
catch error as JSONWriteException:
print(error.message)
Inherited Properties
propertyInherited Properties from Exception: message
propertyInherited Properties from Object: type
Constructors
Modifier and Type Member Description
public JSONWriteException
JSONWriteException(message as String = "Value cannot be represented as JSON"):
Creates a JSON serialization error.
Inherited Methods
methodInherited Methods from UncheckedException: toString
methodInherited Methods from Exception: toString
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toString, toXml