boolean hasStringClaim(String name) {
    JwtNames.validate(name);
    return (payload.has(name)
        && payload.get(name).isJsonPrimitive()
        && payload.get(name).getAsJsonPrimitive().isString());
  }
Adds a custom claim encoded in a JSON {@code String} to the JWT.
java_src/src/main/java/com/google/crypto/tink/jwt/RawJwt.java