JSON Feed for Ceylon provides domain objects and a parser for JSON Feed.
Source code for the following Ceylon modules is available in this repository:
herd.jsonfeed.core
: The parser and domain objectsherd.jsonfeed.jvmSample
: A small sample CLI program for the Java backendherd.jsonfeed.jsSample
: A small sample web program for the JavaScript backend
Visit https://jvasileff.github.io/ceylon-jsonfeed/ to see a (very) simple JSON Feed reader that was built using this module.
ceylon compile
ceylon compile-js
- Build the modules as described above with
ceylon compile-js
- Copy dependencies to the modules directory with
ceylon copy --js --with-dependencies herd.jsonfeed.jsSample
- Open
index.html
in a web browser
To use the module, simply add the following import to module.ceylon
:
import herd.jsonfeed.core "0.0.0";
The following code can be used to obtain an instance of Feed
from a JSON
String:
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);
}
The content of this repository is released under the MIT License as provided in the LICENSE file that accompanied this code.
By submitting a "pull request" or otherwise contributing to this repository, you agree to license your contribution under the license mentioned above.