Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendCallStack ¶
func YamlToJSON ¶
process all documents from input and return them encode as json
if only one document exists, then it returns a single object, otherwise it returns a json.
Keys that are not strings will be converted to strings, except null and binary which will not be processed.
Empty documents are added ass empty json documents, eg.:
example.yaml: name: "first" --- name: "second" --- --- 10: "int key" 10.1: "float key"
Will be encoded as example.json: [
{ "name": "fist"}, { "name": "second"}, {}, { "10": "int key", "10.1": "float key"}
]
Non-string keys are encoded using fmt.Sprintf("%v", nonStringValue), except for binary/null keys which are not supported at all!
Binary data is encoded to base64 ¶
This whole code is probably full of bugs that might cause some unexpected behaviour, but for that matter, using non string keys in Yaml comes with its own set of challenges...
So I hope people won't be too mad about some inconsistencies here... (famous last words rigth?!)
Types ¶
This section is empty.