private static <T> Optional<T> getParsedValue(
      final ObjectNode json, final String name, final Function<String, T> parser) {

    return getValue(json, name).map(JsonNode::asText).map(parser);
  }
Gets Wei.

@param json the json
@param key the key
@param defaultValue the default value
@return the Wei
config/src/main/java/org/hyperledger/besu/config/JsonUtil.java