behrang / YamlSwift

Load YAML and JSON documents using Swift
MIT License
404 stars 97 forks source link

a problem #80

Open OHeroJ opened 5 years ago

OHeroJ commented 5 years ago
let frontMatter: Yaml = ["title": "Welcome to Spelt", "layout": "post", "date": .string(dateString)]
let generatedContents = frontMatter.string ?? "" + "---\n\n" + postContents

can we frontMatter.string get value in this case? dump

seivan commented 5 years ago

I am sorry, are you looking for a string description?

OHeroJ commented 5 years ago

like dump from https://github.com/jpsim/Yams

let scalarYAML: String = try Yams.dump(object: string)