My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
JSONFeed  
Description of the JSON feed
Updated Oct 20, 2010 by lars.he...@gmail.com

Introduction

Aside from the Atom feed, Atomico optionally serves a JSON feed if the client sends an Accept: application/json header. Although a few solutions for translating Atom to JSON exist (see references), Atomico serves a slightly different JSON representation which is dedicated to SDShare feeds.

The main differences to the common Atom to JSON translations are:

  • atom:title and atom:summary are simple strings and not objects
  • SDShare-specific fields do not require a namespace declaration but use Safe CURIEs with an implicit defined prefix "sd"

Details

Common Feed Properties

Field Description
id The atom:id value
title The atom:title[not(@type) or @type='text'] value
updated The atom:updated value
summary The atom:summary[not(@type) or @type='text'] value (optional)
generator Serialization of the atom:generator object (optional)
links Array of serialized atom:link objects (optional)
entries Array of serialized atom:entry objects (optional)
authors Array of serialized atom:author objects (optional)

Note: If the feed has no authors field or the authors array is empty, all entries must have a non-empty authors field

Overview Feed

The overview feed inherits all common feed properties and adds no further properties aside from the requirement that the "links" array contains links to the collection feeds (the "rel" property is set to "http://www.egovpt.org/sdshare/collectionfeed").

Collection Feed

The collection feed inherits all common feed properties and may have optionally links to the dependencies of the collection in the "links" array (the "rel" property is set to "http://www.egovpt.org/sdshare/dependency"). Further it MUST have an entry which references the snapshots feed (the "rel" property of the link is set to "http://www.egovpt.org/sdshare/snapshotsfeed") and an entry which references the fragments feed (the "rel" property of the link is set to "http://www.egovpt.org/sdshare/fragmentsfeed").

Snapshots Feed

The snapshots feed inherits all common feed properties and adds the following fields:

Field Description
[sd:prefix] An IRI which is used to resolve IRIs of the snapshots against

All links which refer to snapshots must have a "type" field which specifies the media type of the referenced snapshot.

Fragments Feed

The fragments feed inherits all common feed properties and adds the following field:

Field Description
[sd:prefix] An IRI which is used to resolve IRIs of the fragments against

Fragment Entry

All fragment entries must have the following field:

Field Description
[sd:topic-si] An array of IRIs which refer to those topics which are being updated from all those present in the fragment. The array must not be empty and contain at minimum one IRI

All links which refer to fragments must have a "type" field which specifies the media type of the referenced fragment.

Entry Properties

Field Description
id The atom:id value
title The atom:title[not(@type) or @type='text'] value
updated The atom:updated value
summary The atom:summary[not(@type) or @type='text'] value (optional)
links Array of serialized atom:link objects
authors Array of serialized atom:author objects (optional)

Note: If the feed has no authors field or the authors array is empty, all entries must have a non-empty authors field

Link Properties

Field Description
href The atom:link/@href value
rel The atom:link/@rel value (optional)
type The atom:link/@type value (optional)

Author Properties

Field Description
name The atom:name value
email The atom:email value (optional)
uri The atom:uri value (optional)

Generator Properties

Field Description
value The atom:generator value
uri The atom:generator/@uri value (optional)

References


Sign in to add a comment
Powered by Google Project Hosting