code: public void linkFromJSON(Model mo, Network net, JSONObject o) throws JSONConverterException {
          net.connect(requiredInt(o, "id"),
                  readCapacity(o),
                  getSwitch(net, requiredInt(o, SWITCH_LABEL)),
                  physicalElementFromJSON(mo, net, (JSONObject) o.get("physicalElement"))
          );
      }
docs: Convert a JSON link object into a Java Link object.
  
  @param net the network to populate
  @param   o the JSON object to convert