protected void collectStructuredClaim(final JwtClaims claims, final OidcAttributeDefinition definition,
                                          final Object finalValue) {
        val claimNames = Splitter.on('.').splitToList(definition.getName().trim());
        val structuredClaims = new HashMap<>();

        var lastClaimName = claimNames.getLast();
        structuredClaims.put(lastClaimName, finalValue);

        for (var i = claimNames.size() - 2; i >= 1; i--) {
            val lastClaimValue = structuredClaims.remove(lastClaimName);
            val currentClaimName = claimNames.get(i);
            structuredClaims.put(currentClaimName, CollectionUtils.wrap(lastClaimName, lastClaimValue));
            lastClaimName = currentClaimName;
        }
        LOGGER.debug("Collecting structured ID token claim [{}] with nested entries [{}]", claimNames.getFirst(), structuredClaims);
        claims.setClaim(claimNames.getFirst(), structuredClaims);
    }
This is {@link OidcSimpleIdTokenClaimCollector}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/claims/OidcSimpleIdTokenClaimCollector.java