code: public JSONObject routingToJSON(Routing routing) throws JSONConverterException {
          RoutingConverter c = java2json.get(routing.getClass());
          if (c == null) {
              throw new JSONConverterException("No converter available for a routing with the '" + routing.getClass() + "' className");
          }
          return c.toJSON(routing);
  
      }
docs: Convert a Routing implementation into a JSON object
  
  @param routing   the routing implementation to convert
  @return  the JSON formatted routing object
  @throws  JSONConverterException if the Routing implementation is not known