---
title: "RSS as JSON Using node.js"
description: "Lately me and one my hacker buddies we talking about a project plan, in which RSS as JSON was a major module, some simple."
url: "https://h3manth.com/scribe/rss-json-using-nodejs/"
canonical_url: "https://h3manth.com/scribe/rss-json-using-nodejs/"
markdown_url: "https://h3manth.com/scribe/blog/rss-json-using-nodejs.md"
publishDate: "2012-06-21T00:00:00.000Z"
author: "Hemanth HM"
category: "javascript"
tags: ["nodejs","javascript","web"]
word_count: 129
reading_time_minutes: 1
x_markdown_tokens: 301
content_signal: "ai-train=yes, search=yes, ai-input=yes"
---

# RSS as JSON Using node.js

> Lately me and one my hacker buddies we talking about a project plan, in which RSS as JSON was a major module, some simple.

Lately me and one my hacker buddies we talking about a project plan, in which RSS as JSON was a major module, some simple module mixing from node made the job very easy.

Made a npm package out of it, to install just do `npm install rsj`

Code for which, is very simple, yet seems to be doing the job as needed so far, the code looks like :

exports.r2j = r2j;

var FeedParser = require('feedparser'); parser = new FeedParser();

function r2j(uri, cb) { parser.parseUrl(uri, function (err, meta, articles) {
    
    
    if (err) return console.error(err);
    cb(JSON.stringify(articles));
    

}); } 

## RSS as JSON using nodejs

_EXAMPLE USAGE :_

rsj = require('rsj');

rsj.r2j('http://h3manth.com/rss.xml',function(json) { console.log(json);}) 

This is kina a baby, still trying to improve, you feedback is always welcomed :) Happy Hacking!
