<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 27, 2017, at 12:53 PM, Sam McCall via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">We don't have a dedicated JSON library in the LLVM tree, I'd like to add one. The pressing need is for clangd, but we have other tools that read/write JSON too.</div><div class=""><br class=""></div><div class="">I'm proposing we write a new one, rather than importing a third-party library (licensing/integration reasons), on or extending YamlParser/YamlIO (usability/flexibility). I lean towards a design that parses a full DOM at once, and provides literal-like syntax for composing documents.</div><div class=""><br class=""></div><div class="">I've written a document laying out the reasons for taking this path, and my proposal for a design (with links to a prototype)</div><a href="https://docs.google.com/document/d/1OEF9IauWwNuSigZzvvbjc1cVS1uGHRyGTXaoy3DjqM4/edit" class="">https://docs.google.com/document/d/1OEF9IauWwNuSigZzvvbjc1cVS1uGHRyGTXaoy3DjqM4/edit</a><br class=""><div class="">(Comments are enabled, but high-level discussion probably belongs on the list instead.)<br class=""></div><div class=""><br class=""></div><div class="">What do you think? I'm particularly interested in which parts of LLVM produce/consume JSON (or might want to), and what they need. I'm mostly familiar with the stuff in clang-tools-extra.</div></div></div></blockquote><div><br class=""></div>llvm-cov exports coverage data to JSON. The exporter isn't a big maintenance burden, but it would be nice not to 'printf' the output, and to instead have assurance that something else will properly structure/escape the data. Concretely: we could get rid of some tests that check that the JSON is structurally valid, and only keep tests that check that the output is complete.</div><div><br class=""></div><div>vedant</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Cheers, Sam</div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></body></html>