Use the latest FastStreams API

This commit is contained in:
Zahary Karadjov 2020-04-09 23:14:14 +03:00
parent f52683b2ee
commit bdddff5037
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609

View File

@ -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