diff --git a/private/presenter.nim b/private/presenter.nim index c084015..072ff04 100644 --- a/private/presenter.nim +++ b/private/presenter.nim @@ -580,6 +580,9 @@ proc present*(s: var YamlStream, target: Stream, tagLib: TagLibrary, indentation -= options.indentationStep of yamlEndDoc: if finished(s): break + if options.style == psJson: + raise newException(YamlPresenterJsonError, + "Cannot output more than one document in JSON style") safeWrite("..." & newline) proc transform*(input: Stream, output: Stream,