mirror of
https://github.com/status-im/nim-json-serialization.git
synced 2025-02-16 12:07:35 +00:00
include flavor in missing readValue
error (#86)
This commit is contained in:
parent
da49e0e0c5
commit
c869dae884
@ -328,10 +328,13 @@ proc readValue*[T](r: var JsonReader, value: var T)
|
||||
flavorUsesAutomaticObjectSerialization(Flavor)
|
||||
|
||||
when not isAutomatic:
|
||||
const typeName = typetraits.name(T)
|
||||
{.error: "Please override readValue for the " &
|
||||
typeName &
|
||||
" type (or import the module where the override is provided)".}
|
||||
const
|
||||
flavor =
|
||||
"JsonReader[" & typetraits.name(typeof(r).Flavor) & "], " &
|
||||
typetraits.name(T)
|
||||
{.error:
|
||||
"Missing Json serialization import or implementation for readValue(" &
|
||||
flavor & ")".}
|
||||
|
||||
readRecordValue(r, value)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user