code: private void replaceMapWithJsonObject(String claimName, JwtClaims claimsSet) {
          try {
              Map<String, Object> map = claimsSet.getClaimValue(claimName, Map.class);
              JsonObjectBuilder builder = Json.createObjectBuilder();
              for (Map.Entry<String, Object> entry : map.entrySet()) {
                  builder.add(entry.getKey(), entry.getValue().toString());
              }
              JsonObject jsonObject = builder.build();
              claimsSet.setClaim(claimName, jsonObject);
          } catch (MalformedClaimException e) {
              if (tc.isDebugEnabled()) {
                  Tr.debug(tc, "The value for the claim [" + claimName + "] could not be convered to a Map: " + e.getLocalizedMessage());
              }
          }
      }
docs: Replace the jose4j Map<String,Object> with a JsonObject