GithubHelp home page GithubHelp logo

ceylon-jsonfeed's Introduction

JSON Feed for Ceylon

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 objects
  • herd.jsonfeed.jvmSample: A small sample CLI program for the Java backend
  • herd.jsonfeed.jsSample: A small sample web program for the JavaScript backend

Try the live demo!

Visit https://jvasileff.github.io/ceylon-jsonfeed/ to see a (very) simple JSON Feed reader that was built using this module.

Building the Modules

Compile the Java backend core and sample modules with:

ceylon compile

Compile the JavaScript backend core and sample modules with:

ceylon compile-js

Run the JavaScript sample module:

  1. Build the modules as described above with ceylon compile-js
  2. Copy dependencies to the modules directory with ceylon copy --js --with-dependencies herd.jsonfeed.jsSample
  3. Open index.html in a web browser

Using the Module

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);
}

License

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.

ceylon-jsonfeed's People

Contributors

jvasileff avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.