This commit is contained in:
Felix Krause 2017-08-30 18:04:52 +02:00
parent 27d8eaeb35
commit ff86083461
1 changed files with 6 additions and 1 deletions

View File

@ -1212,7 +1212,12 @@ proc constructChild*[O](s: var YamlStream, c: ConstructionContext,
proc representChild*(value: string, ts: TagStyle, c: SerializationContext) =
if isNil(value): c.put(scalarEvent("", yTagNimNilString))
else: representObject(value, ts, c, presentTag(string, ts))
else:
let tag = presentTag(string, ts)
echo "tag == ", tag
representObject(value, ts, c,
if tag == yTagQuestionMark and guessType(value) != yTypeUnknown:
yTagExclamationMark else: tag)
proc representChild*[T](value: seq[T], ts: TagStyle, c: SerializationContext) =
if isNil(value): c.put(scalarEvent("", yTagNimNilSeq))