title: Gremlin: Pretty print a query results in a JSON-like way
body: <p>I'd like to print a Gremlin query results in a JSON style. That is, all properties in a key: value format, one per line, and optionally, the edges too, like,  "edge label" -> v[1234], or such.</p>
  
  <p>In Java, when I use <code>toString()</code> on a vertex, it prints what I want, only on a single line.</p>
  
  <p>I've tried <code>g.V().toString()</code> but that prints the same as if <code>toString()</code> is not there.</p>
  
  <p>Maybe some Groovy trick could be used in combination with <code>getProperties()</code>?</p>
  
  <p>(There's a similar question, <a href="https://stackoverflow.com/questions/15508599/how-to-print-out-gremlin-pipe-traversal-results">How to print out Gremlin pipe / traversal results</a>, but that's something different.)</p>