code: public static State jsonObjectToState(JsonObject jsonObject, String... excludeKeys) {
      State state = new State();
      List<String> excludeKeysList = excludeKeys == null ? Lists.<String>newArrayList() : Arrays.asList(excludeKeys);
      for (Map.Entry<String, JsonElement> jsonObjectEntry : jsonObject.entrySet()) {
        if (!excludeKeysList.contains(jsonObjectEntry.getKey())) {
          state.setProp(jsonObjectEntry.getKey(), jsonObjectEntry.getValue().getAsString());
        }
      }
      return state;
    }
docs: Converts a {@link JsonObject} to a {@link State} object. It does not add any keys specified in the excludeKeys array