code: @Override
      public JSONObject toJSON(StaticRouting routing) {
          JSONObject o = new JSONObject();
          o.put("type", getJSONId());
          JSONArray a = new JSONArray();
          Map<StaticRouting.NodesMap, Map<Link, Boolean>> routes = routing.getStaticRoutes();
          for (Map.Entry<StaticRouting.NodesMap, Map<Link, Boolean>> e : routes.entrySet()) {
              StaticRouting.NodesMap nm = e.getKey();
              JSONObject ao = new JSONObject();
              ao.put("nodes_map", nodesMapToJSON(nm));
              JSONArray links = new JSONArray();
              Map<Link, Boolean> v = e.getValue();
              for (Link l : v.keySet()) {
                  JSONObject lo = new JSONObject();
                  lo.put("link", l.id());
                  lo.put("direction", routes.get(nm).get(l).toString());
                  links.add(lo);
              }
              ao.put("links", links);
              a.add(ao);
          }
          o.put(ROUTES_LABEL, a);
          return o;
      }
docs: Convert a Routing implementation into a JSON object
  
  @param routing the routing implementation to convert
  @return the JSON formatted routing object