Parse + validate. Rejects unknown versions and reserved channels.
Throws rather than degrading: there is no half an encoding spec. The
failure convention and its error hierarchy are documented in
@g3-toolkit/core's model/document-errors.ts. This used to call
JSON.parse bare, so malformed text escaped as a raw SyntaxError
and the literal "null" escaped as a TypeError; both are typed
failures now.
Parse + validate. Rejects unknown versions and reserved channels.
Throws rather than degrading: there is no half an encoding spec. The failure convention and its error hierarchy are documented in
@g3-toolkit/core'smodel/document-errors.ts. This used to callJSON.parsebare, so malformed text escaped as a rawSyntaxErrorand the literal"null"escaped as aTypeError; both are typed failures now.