ninjs: News in JSON
One standard, countless use cases.
ninjs standardises the representation of news in JSON – a lightweight, easy-to-parse, data interchange format.
Almost every media organisation today is working on a project (or ten) that involves expressing a news item in JSON. From content APIs to mobile applications to document databases, JSON has moved into a position of technical prominence across the enterprise. In 2012, we went around the table at an IPTC meeting and realised nearly all of us had our own internal approaches for serialising news data in JSON. And so a standard was born. Approved and released in October 2013, ninjs provides key properties and structures required to represent news and publishing information.
In October 2023, ninjs version 2.1 was approved.
- ninjs 1.4, approved in May 2022
- ninjs 2.0, approved in October 2021
- ninjs 1.3, approved in May 2020
- ninjs 1.2, approved in October 2019
- ninjs 1.1, approved in March 2014
- ninjs 1.0, approved in October 2013
ninjs User Guide
The IPTC ninjs user guide, updated for ninjs 2.0, explains how to use ninjs in your own applications, how to validate it using JSON Schema tools, gives some best practice guidelines and detailed descriptions of each property.
- ninjs Generator
We have created a ninjs Generator that lets you create a simple ninjs document from sample text entered into a form. This lets you see immediately what a ninjs file can look like and how easy it can be to create your own ninjs content.
- GraphQL examples
A demonstration of how graphQL can be used to process ninjs content, including an embedded GraphQL server.
- XSLT Stylesheets
Example XSLT stylesheets showing how to convert from NITF, NewsML 1 and NewsML-G2 to ninjs format.
Example files describing a variety of use cases for ninjs from press releases to breaking news are available at our GitHub repository at https://github.com/iptc/newsinjson/tree/master/examples.
Mapping between ninjs, NewsML-G2 and the IPTC News Architecture
The IPTC News Architecture is the underlying data model behind all of IPTC’s standards. ninjs properties conform with the equivalent elements in the News Architecture which means that it maps to NewsML-G2. The user guide shows how ninjs properties map to their equivalent NewsML-G2 elements.
IPTC members regularly discuss ninjs at our News in JSON Working Group meetings and on the members-only News in JSON WG discussion group.
Non-members are welcome to discuss ninjs at the public ninjs discussion group.