public void switchesFromJSON ( Network net , JSONArray a ) throws JSONConverterException { for ( Object o : a ) { net . newSwitch ( requiredInt ( ( JSONObject ) o , "id" ) , readCapacity ( ( JSONObject ) o ) ) ; } }
Convert a JSON array of switches to a Java List of switches .