JSON Feed for Ceylon provides domain objects and a parser for JSON Feed.

To use, parse a JSON string using the ceylon.json module, and then convert the resultant JsonObject to a Feed as shown in the code below:

import ceylon.json { JsonObject, parseJson = parse }
import herd.jsonfeed.core { Feed, parseFeed }

shared void run() {
    String rawJson = ...;
    assert (is JsonObject json = parseJson(rawJson));
    Feed feed = parseFeed(json);
}
Packages
herd.jsonfeed.core

The core JSON Feed for Ceylon package.

Dependencies
ceylon.json1.3.2
ceylon.time1.3.2
ceylon.uri1.3.2

The core JSON Feed for Ceylon package.

Functions
parseAttachmentshared Attachment parseAttachment(JsonObject json)

Produce an Attachment from the given json object.

parseAuthorshared Author? parseAuthor(JsonObject? json)

Produce an Author from the given json object, or return null if json is null.

parseFeedshared Feed parseFeed(JsonObject json)

Produce a Feed from the given json object.

parseItemshared Item parseItem(JsonObject json)

Produce an Item from the given json object.

Classes
Attachmentshared Attachment

An Attachment, as described in the JSON Feed Verson 1 Specification.

An individual Item may have one or more attachments.

Authorshared Author

An Author, as described in the JSON Feed Verson 1 Specification.

The author object has several members. These are all optional — but if you provide an author object, then at least one is required.

Feedshared Feed

A Feed, as described in the JSON Feed Verson 1 Specification.

Itemshared Item

An Item, as described in the JSON Feed Verson 1 Specification.