mirror of
https://github.com/status-im/nim-json-serialization.git
synced 2025-02-16 12:07:35 +00:00
Add a low-level API for controlling the state of the Writer when writing to the output stream manually
This commit is contained in:
parent
32f75d93b0
commit
cedf0c5f0c
@ -70,6 +70,9 @@ proc writeField*(w: var JsonWriter, name: string, value: auto) =
|
||||
|
||||
w.state = AfterField
|
||||
|
||||
template fieldWritten*(w: var JsonWriter) =
|
||||
w.state = AfterField
|
||||
|
||||
proc beginRecord*(w: var JsonWriter) =
|
||||
doAssert w.state == RecordExpected
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user