A long time ago Swift needed to serialize some things to JSON. LLVM already had support for serializing YAML, but the system on the other end (something in Xcode, I think) only understood JSON. Since we needed to get things up and running, we just made a clone of llvm::yaml::Output called swift::json::Output that handled the JSON subset and produced JSON-formatted output.
The right thing to do here is for llvm::yaml::Output to have an option flag that says "please use a JSON-compatible serialization". Then swift::json can go away.