IPTC News in JSON AGM 2013

14
News in JSON Stuart Myles * Associated Press * 25 th June 2013 http://www.flickr.com/photos/anirudhkoul/3536413126/

description

Standardizing the representation of news in JSON

Transcript of IPTC News in JSON AGM 2013

Page 1: IPTC News in JSON AGM 2013

News in JSON

Stuart Myles * Associated Press * 25th June 2013http://www.flickr.com/photos/anirudhkoul/3536413126/

Page 2: IPTC News in JSON AGM 2013

Remind Me: What is JSON?JSON = JavaScript Object Notation http://json.org/

Name / value pairs: a fieldname in quotes, a colon, a value in quotes

"givenname" : "Stuart"

Objects: written inside curly braces, may contain multiple NVPs

{"givenname" : "Stuart", "familyname" : "Myles"}

Arrays: Written inside square braces, may contain multiple objects{"iptcdelegates": [ { "givenname": "Dave", "familyname": "Compton"}, { "givenname": "Stuart", "familyname": "Myles"}, { "givenname": "Robert", "familyname": "Schmidt-Nia" }]}

© 2013 IPTC (www.iptc.org) All rights reserved 2

Page 3: IPTC News in JSON AGM 2013

Remind Me: Why News in JSON?

Lightweight, easy to parse format

Increasingly popular alternative to / replacement for XML

Two principle use cases:

data interchange (e.g. APIs) with more emphasis on partial representation

data at rest (e.g. search engines like Elastic Search or MongoDB)

Not simply translating from an existing XML standard into JSON

Determine how to represent key properties and structures

Hand crafted, rather than mechanically translating from XML into JSON

Goal: comprehensive standard, lightweight instance documents

© 2013 IPTC (www.iptc.org) All rights reserved 3

Page 4: IPTC News in JSON AGM 2013

News in JSON Activity

http://www.flickr.com/photos/jondresner/5789254800/

News In JSON Activity

http://www.flickr.com/photos/jondresner/5789254800/

Page 5: IPTC News in JSON AGM 2013

News in JSON Activity

http://www.flickr.com/photos/jondresner/5789254800/

News In JSON Activity

http://www.flickr.com/photos/jondresner/5789254800/

NINJA

NINJS

Page 6: IPTC News in JSON AGM 2013

NINJS Overview

© 2013 IPTC (www.iptc.org) All rights reserved 6

Page 7: IPTC News in JSON AGM 2013

NINJS Data Model

© 2013 IPTC (www.iptc.org) All rights reserved 7

Page 8: IPTC News in JSON AGM 2013

NINJS Highlight #1Descriptive Metadata

Same basic structure

but differing properties per type and preference

"place" : [{ "name" : "New York City", "name@ru" : "Нью-Йорк", "why" : "direct", "how" : "extracted", "rel" : "about", "scheme" : "http://data.example.com/", "code" : "N46020133052049607171"}], "subject" : [{ "name": "Data-Mining & Database Marketing", "rel" : "about"}]

© 2013 IPTC (www.iptc.org) All rights reserved 8

Page 9: IPTC News in JSON AGM 2013

NINJS Highlight #2Text Markup

A single object with a property per text markup type

"body" : { "text": "It was a case for a digital Sherlock Holmes.", "html": "<b>It was a case for a digital Sherlock Holmes.", "iptc7901" : "It was a case for a digital Sherlock Holmes.\u201d", "nitf": "<p>It was a case for a digital Sherlock Holmes.<\/p>", "xhtml": "<p>It was a case for a digital Sherlock Holmes.<\/p>" }

© 2013 IPTC (www.iptc.org) All rights reserved 9

Page 10: IPTC News in JSON AGM 2013

NINJS Highlight #3Associations and Representations

• NINJS is a JSON representation of a news item• You can represent a complete item, with all properties

– For instance in an internal CMS like MongoDB

• Or you may want to convey key properties– For instance as an API response

• The representationtype property indicates how complete

• Associations are themselves NINJS documents– You may include complete or partial representations

© 2013 IPTC (www.iptc.org) All rights reserved 10

Page 11: IPTC News in JSON AGM 2013

JSON-LD

• JSON for Linked Data• A W3C effort to add conventions to JSON documents to

support Linked Data concepts, currently in last call• http://www.w3.org/TR/json-ld/• Do we want to adopt any of the JSON-LD conventions

for NINJS?• Or would it create too much of a burden for clients?

© 2013 IPTC (www.iptc.org) All rights reserved 11

Page 12: IPTC News in JSON AGM 2013

NINJS Spec

• Reference document– https://www.stypi.com/Td4K2niLwPJRbIM697EYTtEO

• Working document– https://www.stypi.com/pZxwJ2pADLcb77Vw64gfn9HA

• JSON Schema– http://json-schema.org/– Not entirely real but better than inventing our own– https://www.stypi.com/D7GbLXJUugfrLOlDezCr49jt

• How strict?– Balance between flexibility and interoperability

© 2013 IPTC (www.iptc.org) All rights reserved 12

Page 13: IPTC News in JSON AGM 2013

News in JSON Road Map

• Complete the initial draft• Review property names• Experiment with implementations

• Create a NINJS 1.0 recommendation– Present it for a vote at the Washington, DC meeting– Consider an experimental phase

• You can help by joining the News in JSON group– [email protected]

© 2013 IPTC (www.iptc.org) All rights reserved 13

Page 14: IPTC News in JSON AGM 2013

Date and Place of Next Meeting

Washington, DC 21 - 23 October, 2013

http://www.flickr.com/photos/pcscheid/4351707431/

Merci et à bientôt!

© 2013 IPTC (www.iptc.org) All rights reserved 14