added json processing of graphs