public Periods readPeriods(JsonReader reader) throws IOException {
    String currency = null;
    String id = null;
    String name = null;
    Number pricekWh = null;
    
    
    
    reader.beginObject();
    while (reader.hasNext()) {
      String key = reader.nextName();
      if (key.equals("currency")) {
        currency = reader.nextString();
      } else if (key.equals("id")) {
        id = reader.nextString();      
      } else if (key.equals("name")) {
        name = reader.nextString();
      } else if (key.equals("pricekWh")) {
        pricekWh = reader.nextDouble();        
      } else {
        System.err.println("Building Periods: Unknown key: "+key);
        reader.skipValue();
      }
    }
    reader.endObject();
    return new Periods(currency, id, name, pricekWh);
  }