Support proper JSON serialization/deserialization for certificates.

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

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.

Summary ID
Support proper JSON serialization/deserialization for certificates.
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.
3eb6d297655bfbb6b38b2e34e3a4597a35b99e7c
maubin
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-6.x (a3f8396)
Loading...