2019-03-19 23:54:03 +00:00
|
|
|
import
|
|
|
|
serialization/errors
|
|
|
|
|
|
|
|
export
|
|
|
|
errors
|
|
|
|
|
2019-01-21 17:40:14 +00:00
|
|
|
type
|
|
|
|
JsonMode* = enum
|
|
|
|
Relaxed
|
|
|
|
Portable
|
|
|
|
|
2019-03-19 23:54:03 +00:00
|
|
|
JsonError* = object of SerializationError
|
2019-01-21 17:40:14 +00:00
|
|
|
|
2020-06-01 18:15:22 +00:00
|
|
|
JsonString* = distinct string
|
|
|
|
|
2019-01-21 17:40:14 +00:00
|
|
|
const
|
|
|
|
defaultJsonMode* = JsonMode.Relaxed
|
|
|
|
minPortableInt* = -9007199254740991 # -2**53 + 1
|
|
|
|
maxPortableInt* = 9007199254740991 # +2**53 - 1
|
|
|
|
|
2020-07-17 20:58:02 +00:00
|
|
|
template `==`*(lhs, rhs: JsonString): bool =
|
|
|
|
string(lhs) == string(rhs)
|