Hey Erwan, This sounds similar to something I started recently, but haven't been able to finish completely. Although, it's actually probably pretty close to being able to merge. Let me know if it seems like it might help out and we can work out what's needed to handle your case.. https://github.com/ceph/ceph/pull/23716 - Noah On Wed, Nov 7, 2018 at 7:11 AM Erwan Velu <evelu@xxxxxxxxxx> wrote: > > Hi list, > > I'm working on a tool that reads the json output of several ceph commands. > > To ease the parsing, I've been choosing the JSON format which guarantee > a parseable output. > > I'm using the Unmarshall feature of golang to map this output in an > internal data structure so every member of this JSON output is easily > reachable from the code. > > That works pretty well except that I have to "anticipate" what will the > be members and their types. > > To do that, I've been transforming the sample output of my Ceph cluster > (luminous) into a data struct with https://mholt.github.io/json-to-go/ > > That works fine unless that I would be a complete output to get every > possible combination of the json output. > > > So instead of reversing the json output, and that per version of Ceph as > versions can change the format, how can I extract the complete JSON > schema from each command ? > > > Erwan, >