change common module to parser
This commit is contained in:
parent
f8260e9154
commit
1a506be83a
|
@ -1,11 +1,11 @@
|
|||
import ./json/common
|
||||
import ./json/parser
|
||||
import ./json/deserializer
|
||||
import ./json/stdjson
|
||||
import ./json/pragmas
|
||||
import ./json/serializer
|
||||
import ./json/types
|
||||
|
||||
export common
|
||||
export parser
|
||||
export deserializer
|
||||
export stdjson
|
||||
export pragmas
|
||||
|
|
|
@ -12,13 +12,13 @@ import pkg/stint
|
|||
import pkg/questionable
|
||||
import pkg/questionable/results
|
||||
|
||||
import ./common
|
||||
import ./parser
|
||||
import ./errors
|
||||
import ./stdjson
|
||||
import ./pragmas
|
||||
import ./types
|
||||
|
||||
export common
|
||||
export parser
|
||||
export chronicles except toJson
|
||||
export stdjson
|
||||
export pragmas
|
||||
|
@ -281,11 +281,11 @@ proc fromJson*(
|
|||
_: type JsonNode,
|
||||
jsn: string
|
||||
): ?!JsonNode =
|
||||
return common.parseJson(jsn)
|
||||
return parser.parseJson(jsn)
|
||||
|
||||
proc fromJson*[T: ref object or object](
|
||||
_: type T,
|
||||
jsn: string
|
||||
): ?!T =
|
||||
let jsn = ? common.parseJson(jsn) # full qualification required in-module only
|
||||
let jsn = ? parser.parseJson(jsn) # full qualification required in-module only
|
||||
T.fromJson(jsn)
|
||||
|
|
Loading…
Reference in New Issue