fix json regression D20191212T144944 (#12902) [backport]

This commit is contained in:
Timothee Cour
2019-12-15 14:04:06 -08:00
committed by Andreas Rumpf
parent e4e74a5565
commit e5ed4c1b7d

View File

@@ -1055,6 +1055,7 @@ when defined(nimFixedForwardGeneric):
jsonPath.setLen originalJsonPathLen
proc initFromJson[T](dst: var ref T; jsonNode: JsonNode; jsonPath: var string) =
verifyJsonKind(jsonNode, {JObject, JNull}, jsonPath)
if jsonNode.kind == JNull:
dst = nil
else: