Xcode JSONDecoder playground fails with 'The LLDB RPC server has crashed.

If I create a playground project that uses a JSONDecoder I get the following error.

The LLDB RPC Server has crashed. The crash log is located at ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.

I have raised feedback for this, FB17702087, but I hope that there may be a workaround.

The code I am using to try and get this to work is from The Apple Developer Documentation - JSON Decoder


var greeting = "JSON Test 3"

struct GroceryProduct: Codable {
    var name: String
    var points: Int
    var description: String?
}


let json = """
{
    "name": "Durian",
    "points": 600,
    "description": "A fruit with a distinctive scent."
}
""".data(using: .utf8)!


let decoder = JSONDecoder()
let product = try decoder.decode(GroceryProduct.self, from: json)


print(product.name) // Prints "Durian"

A screenshot of the playground showing the error

The crash log (the file type has been changed to txt as ips file types cannot be selected for upload.