Why doesn't #ActivityPub just use ASN.1 DER?
It has
- Deterministic encoding and thus not a night mare to sign and check
- More compact and not have to do at least 2 pass and 2 buffers (not counting data structure overhead) to de-serialize a document.
- Separation of concerns in field representation, binding and canonicalization
- Good historical support in almost any language.
- Actually can de-serialize as you receive data, not having to save what could be megabytes of JSON and at the end receive a
@context and suddenly have a lot of computational work and say hang on a bit I have no idea what you are talking about.- Uses real identifiers not URL for everything, even W3C's own JsonLD schema broke
To me it feels like nobody is adopting it (IMO for good reasons, "infinite extensibility" has costs in efficiency and integrity) so W3C has to use it in #activitystreams. I feel Json-LD is more suitable for immutable archive (backups, tape, etc) when future needs are absolutely not predictable and changing the schema must be done without changing the original data, not here.
RDF Dataset Canonicalization
RDF [RDF11-CONCEPTS] describes a graph-based data model for making claims about the world and provides the foundation for reasoning upon that graph of information. At times, it becomes necessary to compare the differences between sets of graphs, digitally sign them, or generate short identifiers for graphs via hashing algorithms. This document outlines an algorithm for normalizing RDF datasets such that these operations can be performed.


