Exceptions
Currently JSONTools has only one type of exception, JSONToolsError
. It's thrown only when you try to inserta a value into a JSON structure in a way that is impossible.
Here are some examples:
- Trying to
setindex!
to an object that is not aDict
or anVector
. - Trying to
setindex
to a JSON data structure that has aDict
root with a path that doesn't start with aString
key. - Trying to
setindex!
to a JSON data structure that has aVector
root with a path that doesn't start with anInt
key. - Trying to
setindex!
to an array that is smaller than the index you're trying to set, without enabling thecanfilllists
option in the path. - Trying to
setindex!
to a path that is blocked by an existing value, without enabling thecandestroy
option in the path. - Trying to
setindex!
to a path that requires creating parent objects, without enabling theparents
option in the path.
JSONTools.JSONToolsError
— TypeJSONToolsError is the base type for all errors from the JSONTools module.