Make the "lldb/Utility/JSON.h" able to parse JSON into tokens with the new JSONParser class.
Change over existing code to use this new parser so StructuredData can use the tokenizer to parse JSON instead of doing it manually. This allowed us to easily parse JSON into JSON* objects as well as into StructuredData. llvm-svn: 241522
This commit is contained in:
@@ -476,3 +476,12 @@ StringExtractor::GetNameColonValue (std::string &name, std::string &value)
|
||||
m_index = UINT64_MAX;
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
StringExtractor::SkipSpaces ()
|
||||
{
|
||||
const size_t n = m_packet.size();
|
||||
while (m_index < n && isspace(m_packet[m_index]))
|
||||
++m_index;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user