Introduction

CWR-JSON

CWR-JSON is a JSON encoding of the Common Works Registration (CWR) format — the global standard for registering musical works between publishers and collecting societies (PROs / MROs).

It preserves the full semantics of CWR EDI while replacing fixed-width ASCII records with a structured, human-readable JSON document. The result is a format that can be validated with JSON Schema, consumed directly by REST APIs, and read without a CWR parser.


Why CWR-JSON?

CWR EDI has served the industry since the 1990s. Its fixed-width record format is proven but difficult to work with:

  • No native validation tooling — parsers must be hand-built per record type
  • Fixed column offsets are brittle and error-prone
  • Opaque to anyone without a CWR spec in hand
  • Incompatible with modern REST/JSON API infrastructure

CWR-JSON solves all four problems while remaining a lossless representation of the source data — nothing is dropped, simplified, or inferred.


What CWR-JSON Covers (v1.0)

A CWR-JSON file produced by the CWR-JSON Playground reference implementation contains:

SectionWhat it represents
headerFile-level metadata from the CWR HDR record (sender, dates, CWR version, software)
works[].titlesAll titles — original, alternate, non-Roman
works[].identifiersISWC, submitter work numbers, proprietary IDs
works[].partiesOwnership chain: writers → original publishers → sub-publishers; own shares without TIS scope, coll shares per TIS
works[].recordingsCommercial recordings (ISRC, album, label, release date)
works[].messagesRegistration type, revocation flags, ACK messages, schema metadata
works[].flagsAnomalous work indicators, AI usage flags

Territorial collection data from SWT / OWT / SPT / OPT records is represented inside parties[].territories[] as shareTypes with type: "coll".


The Pipeline

CWR EDI text
    │
    ▼
tokenizer + recordParser     lines → { CWR field labels }
    │
    ▼
buildWorkModel               internal WorkModel (per work block)
    │
    ▼
projectCanonicalFromModel    ParsedCwrFile (CanonicalWork[])
    │
    ▼
schemaV1.convert             SchemaV1Output (Playground / download JSON)
StageModule
Parse linessrc/cwr-sdk/parser/tokenizer.ts, recordParser.ts, blockExtractor.ts
Map semanticssrc/cwr-sdk/mapper/workModel/buildWorkModel.ts
Canonical JSONsrc/cwr-sdk/mapper/workModel/projectCanonical.ts
Public APIsrc/cwr-sdk/mapper/canonicalMapper.tstoCanonical() / toCanonicalFromLines()
v1.0 envelopesrc/cwr-sdk/mapper/schemas/schemaV1.ts

The Playground stores ParsedCwrFile after upload. The JSON tree and download apply schemaV1.convert(), which adds messages.schema and messages.schemaDescription on each work.

Future format versions (e.g. v1.1) can add a new serialiser against the same canonical model — CWR line parsing does not need to change. Any format bump will be announced in the Changelog before publication.


Relationship to Other Standards

StandardRelationship
CWR 2.x (through 2.2 Rev3)Source EDI format — CWR-JSON is a JSON encoding of CWR registration data
CAF-JSONSibling format — Common Agreement Format in JSON (agreements/shares between publishers and societies)
ISWC (ISO 15707)Work identifier used in identifiers[]
TIS Numeric CodesTerritory identifier system used in parties[].territories[]
IPI Name/Base NumbersInterested Party identifier used in parties[].ipi

Document ID & Version

PropertyValue
Document IDPUBCWRJSON21-0703
Format Version1.00
Revision0
StatusDRAFT – For Committee Review
Prepared bySociety Publisher Forum (SPF)
Related documentPUBCWRJSON21-0704 – CWR-JSON User Guide
Reference implementationCWR-JSON Playground — src/cwr-sdk in this repository