Support proper JSON serialization/deserialization for certificates.

Review Request #13254 — Created Sept. 3, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This introduces Certificate.to_json(), which creates a serialized
representation of the certificate information. This will be useful for
API payloads soon for error results.

CertificateFingerprints.serialize() has been renamed to to_json(),
allowing it to be included in a SerializableJSONValue payload.
deserialize() was renamed to from_json() for consistency. Going
forward, we should strive for these names for any JSON serialization
functionality.

CertificateFingerprints also gained an equality check, needed for the
Certificate.to_json() tests.

Unit tests pass.

Made use of to_json() in an upcoming change for API errors.

Commits

Files