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