private void writeTrustedRecordsToResource() {
        FunctionUtils.doUnchecked(__ -> {
            val file = this.location.getFile();
            val res = file.createNewFile();
            if (res) {
                LOGGER.debug("Created JSON resource @ [{}]", this.location);
            }
            MAPPER.writerWithDefaultPrettyPrinter().writeValue(file, this.storage);
            readTrustedRecordsFromResource();
        });
    }
This is {@link JsonMultifactorAuthenticationTrustStorage}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-trusted-mfa-core/src/main/java/org/apereo/cas/trusted/authentication/storage/JsonMultifactorAuthenticationTrustStorage.java