diff --git a/lldb/source/API/SBLaunchInfo.cpp b/lldb/source/API/SBLaunchInfo.cpp --- a/lldb/source/API/SBLaunchInfo.cpp +++ b/lldb/source/API/SBLaunchInfo.cpp @@ -387,9 +387,14 @@ if (error.Fail()) return; - StructuredData::DictionarySP dict_sp; - llvm::json::OStream s(stream.ref().AsRawOstream()); - dict_sp->Serialize(s); + StructuredData::ObjectSP obj_sp = + StructuredData::ParseJSON(std::string(stream.GetData())); + if (!obj_sp) + return; + + StructuredData::DictionarySP dict_sp(obj_sp->GetAsDictionary()); + if (!dict_sp) + return; m_opaque_sp->SetScriptedProcessDictionarySP(dict_sp); }