added json support to graphs