public class JSONWriteException extends ValueException:
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.
import klyn.io.json
try:
JSON.stringify({"value": inf})
catch error as JSONWriteException:
print(error.message)| Modifier and Type | Member | Description |
|---|---|---|
| public | JSONWriteExceptionJSONWriteException(message as String = "Value cannot be represented as JSON"): |
Creates a JSON serialization error. |