mirror of
https://github.com/status-im/nim-json-serialization.git
synced 2025-02-18 13:06:25 +00:00
25 lines
408 B
Nim
25 lines
408 B
Nim
import
|
|
tables,
|
|
serialization/errors
|
|
|
|
export
|
|
errors
|
|
|
|
type
|
|
JsonMode* = enum
|
|
Relaxed
|
|
Portable
|
|
|
|
JsonError* = object of SerializationError
|
|
|
|
JsonString* = distinct string
|
|
|
|
const
|
|
defaultJsonMode* = JsonMode.Relaxed
|
|
minPortableInt* = -9007199254740991 # -2**53 + 1
|
|
maxPortableInt* = 9007199254740991 # +2**53 - 1
|
|
|
|
template `==`*(lhs, rhs: JsonString): bool =
|
|
string(lhs) == string(rhs)
|
|
|