DailyJS

JSonduit

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

JSON server services

JSonduit

Posted by Alex R. Young on .
Featured

JSON server services

JSonduit

Posted by Alex R. Young on .

JSonduit by Chris Winberry from Tautologistics is a service that allows you to process a page with server-side JavaScript to create a JSON feed.
Feeds can then be loaded remotely, or widgets can be created.

JSonduit works by allowing you to run remote JavaScript which scrapes
pages. JSonduit's API gives you tools like getElementById
and getElementsByTagName to iterate over elements.

The service doesn't require registration, so you can use my example to
build your own feed:

// Scrapes dailyjs.com/tags.html
var tags = [],
     container = getElementById('container', data[0]);

getElementsByTagName('h3', container).forEach(function(item, index, list) {
  var tag = item.children[0].data;
  tags.push({ title: tag, link: 'http://dailyjs.com/tags.html#' + tag });
});

saveResult(tags);

Notice saveResult is called once to save the data.

What's the Point?

Remotely accessing the feeds from browsers is very easy. Include
http://jsondiut.com/js/tools.min.js then load the feed:

JSonduit.feed.load(feedId, 0, function(data) {
  if (data.error) {
    alert('Feed Error: ' + data.error.error + ' : ' + data.error.desc);
  } else {
    alert(JSON.stringify(data.result));
  }
});

I've used Yahoo! Pipes before, but this is
made by a nodejs list
poster

and it's immediately familiar to me as a JavaScript developer.

Granted, the interface could use a bit of work, but given that it's a
young service JSonduit looks promising. If you come up with cool feeds,
please share in the comments!