DataMatrix / Schema.org Rosetta Stone

Rosetta Stone in the British Museum

DataMatrix and schema.org are two pretty different standards: one is for annotated physical objects with machine readable information, the other is used to annotate web-pages wth machine readable information. You could technically combine both: embedding JSON inside a 2D code is not unheard of, that’s how the Covid vaccine certificate is implemented.

By and large, these are two carriers: JSON-LD and DataMatrix, and two data representations: the schema.org and the GS1 one. There carriers can be swapped, for instance micro-data for schema.org, and QR-Code for the GS1 data. Generally the two standards coexist independently, even though there is quite some overlap between the Application Code within a 2D Barcode and an instance of IndividualProduct.

So I decided to make a small rosetta stone to show the mapping between the two systems.

Mapping between GS1 Application Identifiers and Schema.org IndividualProduct fields
GS1 Schema.org Note
Code Format Field Format
01 GTIN-14 gtin Text or URL
11 YYMMDD productionDate Date
21 variable length serialNumber Text
240 variable length mpn Text
241 variable length sku Text
422 variable length countryOfOrigin Text
3XXX Number (6 digits) size SizeSpecification Codes with prefixes 31, 32, 33, 34 and 35 represents various physical measurements of the product.
7001 NSN nsn Text
8008 Variable length productionDate Date This AI also allows to specify the time of production.
8200 URL url URL

Of course, this table is far from complete, and I feel there are many fields that should be present in the schema.org side. But I find it interesting that there are quite a few equivalences.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.