diff --git a/json_serialization/writer.nim b/json_serialization/writer.nim index 1eda905..a72d4e6 100644 --- a/json_serialization/writer.nim +++ b/json_serialization/writer.nim @@ -180,6 +180,8 @@ proc writeRecordValue*(w: var JsonWriter, value: auto) when fieldType isnot JsonVoid: if writeObjectField(w, value, fieldName, fieldType): w.state = AfterField + else: + discard fieldName w.endRecord() proc writeNumber*[F,T](w: var JsonWriter[F], value: JsonNumber[T]) =