Translates a serialised graph of Java objects to JSON