class JwtProfileDefinition extends CommonProfileDefinition {
    private boolean keepNestedAttributes = true;

    /**
     * <p>Constructor for JwtProfileDefinition.</p>
     */
    public JwtProfileDefinition() {
        super(x -> new JwtProfile());
        setRestoreProfileFromTypedId(true);
    }

    /** {@inheritDoc} */
    @Override
    public void convertAndAdd(UserProfile profile, AttributeLocation attributeLocation, String name, Object value) {<FILL_FUNCTION_BODY>}

    /**
     * <p>Setter for the field <code>keepNestedAttributes</code>.</p>
     *
     * @param keepNestedAttributes a boolean
     */
    public void setKeepNestedAttributes(boolean keepNestedAttributes) {
        this.keepNestedAttributes = keepNestedAttributes;
    }
}

        if (value instanceof Map) {
            var jsonObject = (Map<String, ?>) value;
            jsonObject.forEach((key, objectValue) -> super.convertAndAdd(profile, attributeLocation, key, objectValue));
            if (keepNestedAttributes) {
                super.convertAndAdd(profile, attributeLocation, name, value);
            }
        } else {
            super.convertAndAdd(profile, attributeLocation, name, value);
        }
    
<methods>public void <init>() ,public void <init>(org.pac4j.core.profile.factory.ProfileFactory) <variables>public static final java.lang.String DISPLAY_NAME,public static final java.lang.String EMAIL,public static final java.lang.String FAMILY_NAME,public static final java.lang.String FIRST_NAME,public static final java.lang.String GENDER,public static final java.lang.String LOCALE,public static final java.lang.String LOCATION,public static final java.lang.String PICTURE_URL,public static final java.lang.String PROFILE_URL