It just occurred to me that clang-tidy parses json, and I believe also rolls its own json parser.  Assuming nobody objects to having a json parser in llvm, i think the clang-tidy one would be the one to use as a starting point (assuming it's general enough), then we could delete lldb's<br><br><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 9, 2016 at 7:05 AM Zachary Turner <<a href="mailto:zturner@google.com">zturner@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">zturner added reviewers: dblaikie, chandlerc.<br class="gmail_msg">
zturner added a comment.<br class="gmail_msg">
<br class="gmail_msg">
Having a JSON parser in LLVM seems like a reasonable idea, but I'm afraid the JSON parser that currently exists in LLDB won't do.  As Pavel mentioned, the code has a definite LLDB feel to it, but more importantly it depends on StringExtractor which I think probably doesn't belong in LLVM.  If you want to go down this route, I would start by deleting the StringExtractor changes from this CL.  90% of the stuff StringExtractor is used for, like hex string to number, string to integer, etc are covered by existing LLVM classes or methods.<br class="gmail_msg">
<br class="gmail_msg">
I'm a bit surprised there's not already a json parser in LLVM.  Maybe there's a reason for it.  I think this CL needs a few more reviewers on the LLVM side, so I'm adding a few people.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D24369" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D24369</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>