On Tue, May 17, 2016 at 07:14:12AM -0400, Austin S. Hemmelgarn wrote: > >> By this example I don't mean that JSON has to be the format -- in fact > >> it's a terrible format with all sorts of problems -- any format which > >> is parseable with C libraries would do for us. > > > > My ideas was to allow multiple formats, with slight change to the > > syntax: > > > > $ btrfs --format=json ... > > $ btrfs --format=plain ... > > $ btrfs --format=yaml ... > I like this idea, with one specific caveat, it would be _really_ nice to > be able to control at compile time what formats are supported. > Somebody's eventually going to want XML support, and I'd rather not have > to depend on expat or something similar in a tool that I regularly build > statically (I'm willing to tolerate YAML because that's what I'd use, > but I would probably compile out the JSON support too).
I hope we can avoid any 3rd party library dependencies, we're just generating the output not parsing it. Either copy a version of the libraries or copy the quoting code, the rest can be simply implemented as a printf with enhanced format stings. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html