Converts YAML documents to JSON, preserving structure and data types and returning valid JSON output.