@Override
    public X509CertificateCredential deserialize(final JsonParser jp,
                                                 final DeserializationContext deserializationContext) throws IOException {
        val oc = jp.getCodec();
        val node = (JsonNode) oc.readTree(jp);

        val certificates = node.findValues("certificates");
        val certs = new ArrayList<X509Certificate>(certificates.size());
        certificates.forEach(n -> {
            val cert = n.get(0).textValue();
            val data = EncodingUtils.decodeBase64(cert);
            certs.add(CertUtils.readCertificate(new InputStreamResource(new ByteArrayInputStream(data))));
        });
        return new X509CertificateCredential(certs.toArray(X509Certificate[]::new));
    }
This is {@link X509CertificateCredentialJsonDeserializer}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-x509-core/src/main/java/org/apereo/cas/adaptors/x509/util/X509CertificateCredentialJsonDeserializer.java