Outputs NetJSON format

def json(self, dict=False, **kwargs):
        """
        Outputs NetJSON format
        """
        try:
            graph = self.graph
        except AttributeError:
            raise NotImplementedError()
        return _netjson_networkgraph(self.protocol,
                                     self.version,
                                     self.revision,
                                     self.metric,
                                     graph.nodes(data=True),
                                     graph.edges(data=True),
                                     dict,
                                     **kwargs)