mirror of
https://github.com/status-im/nim-json-serialization.git
synced 2025-02-19 13:34:19 +00:00
Use the latest FastStreams API
This commit is contained in:
parent
f52683b2ee
commit
bdddff5037
@ -9,7 +9,7 @@ type
|
||||
AfterField
|
||||
|
||||
JsonWriter* = object
|
||||
stream*: OutputStreamVar
|
||||
stream*: OutputStream
|
||||
hasTypeAnnotations: bool
|
||||
hasPrettyOutput*: bool # read-only
|
||||
nestingLevel*: int # read-only
|
||||
@ -17,7 +17,7 @@ type
|
||||
|
||||
JsonString* = distinct string
|
||||
|
||||
proc init*(T: type JsonWriter, stream: OutputStreamVar,
|
||||
proc init*(T: type JsonWriter, stream: OutputStream,
|
||||
pretty = false, typeAnnotations = false): T =
|
||||
result.stream = stream
|
||||
result.hasPrettyOutput = pretty
|
||||
|
Loading…
x
Reference in New Issue
Block a user