diff --git a/serde/json/deserializer.nim b/serde/json/deserializer.nim index de7b620..d555be2 100644 --- a/serde/json/deserializer.nim +++ b/serde/json/deserializer.nim @@ -27,9 +27,6 @@ export types {.push raises: [].} -logScope: - topics = "json deserialization" - template expectJsonKind( expectedType: type, expectedKinds: set[JsonNodeKind], json: JsonNode ) = @@ -188,6 +185,10 @@ proc fromJson*[T: ref object or object](_: type T, json: JsonNode): ?!T = let isOptionalValue = typeof(value) is Option var skip = false # workaround for 'continue' not supported in a 'fields' loop + # logScope moved into proc due to chronicles issue: https://github.com/status-im/nim-chronicles/issues/148 + logScope: + topics = "serde json deserialization" + case mode of Strict: if opts.key notin json: diff --git a/serde/json/serializer.nim b/serde/json/serializer.nim index db9d2e6..ddd8a4c 100644 --- a/serde/json/serializer.nim +++ b/serde/json/serializer.nim @@ -20,9 +20,6 @@ export types {.push raises: [].} -logScope: - topics = "json serialization" - proc `%`*(s: string): JsonNode = newJString(s) @@ -99,6 +96,10 @@ proc `%`*[T: object or ref object](obj: T): JsonNode = let hasSerialize = value.hasCustomPragma(serialize) var skip = false # workaround for 'continue' not supported in a 'fields' loop + # logScope moved into proc due to chronicles issue: https://github.com/status-im/nim-chronicles/issues/148 + logScope: + topics = "serde json serialization" + case mode of OptIn: if not hasSerialize: