If you mean exporting to prety json in a txt format, then this is already possible through the Graph Editor window “File” Menu -> “Export To JSON”. This JSON export however is not in sync of the graph, but rather just a way to export/import the graph to a text format.