TTNinjs is, since 2015, the primary delivery format of all TT Nyhetsbyrån content regardless if it is text, images, eventdata, plannings etc.
TTNinjs is a JSON format based on the international standard from IPTC called News in JSON, or NINJS. It was developed by IPTC to be a lightweight alternative to the various XML standards developed by IPTC for news delivery.
The TTNinjs schema is available at https://tt.se/spec/ttninjs/ttninjs-schema_1.6.json
The details of the TT Ninjs schema is discussed in depth in the Metadata section.
Revision history of TTNinjs can be found here.
The displayable payload of a TTNinjs text-object can be found in one of the
body_ elements. body_text
contain the complete text with no markup.
The body_html5
property of a TTNinjs object contain an HTML5 rendition of the
object. It has its own specification here. In 2020 TT
Nyhetsbyrån added a variant of the body html5 part with more features. That
property is called body_richhtml5
and it has its own specification
here
Images do not have any body_ fields.
TTNinjs containing eventdata or planning items have the body_ fields but they contain the same data as you can find in specific fields for these types. The body_ fields function as presentable summaries of the data of each item.
There are also specific body_ fields holding specific data for items like event, planning and pages.
Description on what the various metadata fields contain and mean can be found here.
Further reading on how TT Nyhetsbyrån handle dates in metadata. And the meaning of different date and time fields.
Description on how TT Nyhetsbyrån handle revisions.
TTNinjs for events follow the general TTNinjs specification. But some properties are specific to events.
The date property hold the date when the event is to take place. The enddate show the end date of the event. If the starting time of the event is known the datetime-property will hold that data. And the same if the endtime is a known the complete end date and time will be found in enddatetime.
More specific data about the event is placed in the bodyevent object. Please notice that a canceled event will have eventstatus=4 and eventstatustext=Inställd. The pubstatus of the ttninjs object will still be usable. It is the event that has been canceled, not our information about the event. So the information that the event is canceled need to be shown.
{
...
"body_event": {
"arena": "",
"address": ", Stockholm,",
"organizer": "Myndigheten för ungdoms- och civilsamhällesfrågor ß(MUCF)",
"organizerurl": "",
"organizerphone": "",
"organizermail": "",
"organizeraddress": "",
"organizercity": "",
"organizercountry": "",
"eventstatus": "1",
"eventstatus_text": "Planerad",
"eventtype": "",
"eventtype_text": "",
"accreditation": "Journalister är välkomna att delta under konferensen, anmälan till press@mucf.se eller 010-160 10 20",
"createddate": "2019-10-24T08:10:40+00:00",
"changeddate": "2019-11-22T01:11:57+00:00"
}
...
}
The body_ parts of an event is a more displayable summary of the above data.
As under events the date, datetime, enddate, enddatetime can show dates and, if known, times when the planning activity is to start and end.
Planning items can have assignments. It is an array of assignment objects.
{
"uri": "http://tt.se/media/assignment/0d787e45-97c5-4e71-b430-2c12049112e7",
"originaltransmissionreference": "0d787e45-97c5-4e71-b430-2c12049112e7",
"type": "text",
"versioncreated": "2019-11-26T10:33:15+01:00",
"representationtype": "incomplete",
"pubstatus": "draft",
"headline": "SOS Alarm presenterar en säkrare 112-tjänst",
"body_text": "",
"job": "f709edd1-dc3b-4673-82c3-f29601635ec5",
"fixture": [ ],
"subject": [],
"assignments": {}
}
Much of the data in each assignment is internal to TT. But for customers it will show what type of objects is assigned to be produced and their status. In rapid news-flow several text items will probably be published under each assignment. Pubstatus will change to usable when the first version is published. Following news items will not change the pubstatus, but be listed under the associations.
The body_ parts of a planning is a more displayable summary of the above data.
Webprio & urgency will be replaced with new newsvalue
field. But for a period both will work.
TT added signals for retransmission
and updatetype
.
TT added the property versioncreated to the revisions structure to indicate when an earlier version was published.
TT intentionally skipped version number 1.2 to align with IPTC NINJS v1.3. In this process we decided to deprecate some properties from TTNINJS 1.0 och move to properties defined in the IPTC standard. They are:
Slug will be replaced with the standardized slugline
. But for a period we will use both.
Description_usage will be replaced with ednote
. But for a period we will use both.
Originaltransmissionreference will be moved inside altids
. But for a period both will be used.
Sector will be handled as a genre
. But for a period both will be used.
A new feature in TTNINJS 1.3 is the $standard object that show what version and schema the json file belong to. It will look like this:
"$standard": {
"name": "TTNINJS",
"version": "1.3",
"schema": "https://tt.se/spec/ttninjs/ttninjs-schema_1.3.json"
}
TT produce sport data in a separate system. The json-files follow the TTNINJS schema but the content is a bit different compared to text items. The uri is built from the id in the sport-data system and the profile is DATA:
{
"uri": "http://tt.se/media/text/20191208:TT:0219:0",
...
"profile": "DATA",
}
The sport-data system have the older TTNITF as production format. So the original content is found in the bodyttnitf element of the item. Items with sport-data also have the bodyhtml5 property. It has mainly div's with classes showing the original element name:
<article>
<section class="sport">
<h1 class="sport-discipline">alpint</h1>
<h1 class="sport-location">BEAVER CREEK, Colorado</h1>
<h1 class="sport-what">Världscupen</h1>
<div class="result">
<h2 class="result-vad">herrar, storslalom</h2>
<div class="result-txt">
<p>1) Tommy Ford, USA, 2.31,25 (1.16,40+1.14,85), 2) Henrik Kristoffersen,
Norge, 2.32,05 (1.16,63+1.15,42), 3) Leif Kristian Nestvold-Haugen, do,
2.32,48 (1.16,60+1.15,88), 4) Zan Kranjec, Slovenien, 2.33,00
(1.17,11+1.15,89), 5) Victor Muffat-Jeandet, Frankrike, 2.33,03
(1.17,58+1.15,45), 6) Mathieu Faivre, do, 2.33,31 (1.17,47+1.15,84), 7)
Trevor Philp, Kanada, 2.33,34 (1.17,19+1.16,15), 8) Filip Zubcic,
Kroatien, 2.33,35 (1.18,43+1.14,92), 9) Gino Caviezel, Schweiz, 2.33,56
(1.17,86+1.15,70), 10) Justin Murisier, do, 2.33,64
(1.17,58+1.16,06).</p>
</div>
</div>
Flash (TT-FLASH.json)
News-items
Editiorial information
Feature story
Sports data
The samples can be downloaded as a zip here.