Graph to JSON

Added a method in NetworkDiscovery to convert the graph to a JSON for
the GUI