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.

Full Specification of ninjs

Current Versions

In October 2023, ninjs version 2.1 was approved.

The JSON Schema file describing ninjs 2.1 is available from iptc.org/std/ninjs.

ninjs 1.5, for those who can’t upgrade to ninjs 2.x, was approved in May 2023.

Previous Versions

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 Tools

  • 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

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.

Discussion Group

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.

GitHub Repository

For tracking development of ninjs, see the ninjs GitHub repositoryhttps://github.com/iptc/newsinjson.

Feedback and Reporting Issues

Please leave feedback via the IPTC contact form or by raising an issue on GitHub.