Description
I’d like to propose defining the CEL data model as an array rather than a single JSON object. Here’s why:
-
Event Log Use Cases: Many use cases I envision treat CEL as an event log, which is inherently sequential. Arrays naturally represent an ordered list of events, making the data easier to parse and verify as a chronological record.
-
Abstraction from JSONL: It doesn’t have to be JSONL, it could be a top level array in JSON, but if we represent the data model as an array, then JSONL can easily and effectively be abstracted into array-like entries. This approach maintains simplicity while allowing compatibility with streaming or line-delimited formats.
-
Top-Level Properties as Events: Any properties that might otherwise be placed at the top level (such as
previousLog
) can be inserted as events that follow the same parsing and verification logic. This consistency reduces complexity, since implementers only need to handle a single, well-defined structure (the array). -
Clarity and Consistency: By focusing on an array-based model, we keep the spec uncluttered and aligned with the predominant need for event logging. Objects that include additional top-level fields introduce more overhead and potential confusion when verifying or parsing data.
For reference, please see: #3 and decentralized-identity/didwebvh#160 (comment)