private void ser(final GraphSONGraph graphSONGraph, final JsonGenerator jsonGenerator) throws IOException {
final Graph g = graphSONGraph.getGraphToSerialize();
jsonGenerator.writeStartObject();
if (g.features().graph().variables().supportsVariables())
jsonGenerator.writeObjectField(GraphSONTokens.VARIABLES, new HashMap<>(g.variables().asMap()));
jsonGenerator.writeArrayFieldStart(GraphSONTokens.VERTICES);
if (normalize)
g.V().order(Comparators.HELD_VERTEX_COMPARATOR).forEachRemaining(FunctionUtils.wrapConsumer(jsonGenerator::writeObject));