Google+ Peter Bromberg's .NET Blog | JSON

Peter Bromberg's .NET Blog All Things Programming

Firebase and Angular Fire

12. July 2013 06:44 by admin in database, JSON

Firebase is a cloud database designed to power real-time, collaborative applications.

Add the Firebase library to your app and get access to a shared data structure; any changes made to that data are automatically synchronized with the Firebase cloud and with other clients within milliseconds.

Firebase apps can be written entirely with client-side code, update in real-time out-of-the-box, interoperate well with existing services, scale automatically, and provide strong data security.


GitHub Repo here:

Display RSS Feed with JSONP and AJAX UI-blocking Loader

2. July 2013 08:38 by admin in ASP.NET, JSON

Here is a technique to display an RSS feed with the jQuery $ajax method, using Yahoo's YQL query API to retrieve the feed and return it as JSON:

<title> Feed Demo with Ajax Loader </title>
<script src="//"></script>
<script src="Scripts/jquery.blockUI.js"></script>
function stopUI() {
    $.blockUI({ message: '<img id="AjaxLoader" src="Images/ajax-loader.gif" />',
        css: {
            padding: '25px',
            margin: 0,
            width: '5%',
            top: '40%',
            left: '40%',
            color: '#000',
            textAlign: 'center',
            border: '3px solid #aaa',
            backgroundColor: '#efefef',
            cursor: 'wait'
        overlayCSS: {
            backgroundColor: '#000',
            opacity: 0.2
    $('body').css('cursor', 'wait');
function startUI() {
    $('body').css('cursor', 'default');
$(function() {
function getFeed()
// ajax request to yql public json url 
      url : '',
      jsonp : 'callback',
// tell jQuery that we need JSON format
      dataType : 'jsonp',
// tell YQL that what we want and to output in JSON format
      data : {
          q : 'select * from rss where url =""',
          format : 'json'
// parse response data
      success : function(data) {
        $.each(data.query.results.item, function(i,data)
var news_data =
"<div><a href='""'>" + data.title + "</a>" + 
          data.description +"</div>";
      }    ,
      complete: function(){
<div id="news"></div>

The download includes the Ajax-loader image as well as the required jquery.blockUI.js javascript. (9.58 kb)

How to Format JSON -Style Dates With Javascript

26. June 2013 10:52 by admin in ASP.NET, JSON


Formatting JSON - style Javascript dates can be tricky. Here's some sample code that shows how to do it:

function formatDate( jsonDate)
var date = new Date(parseInt(jsonDate.substr(6)));
return date.getMonth()+'/'+date.getDay()+'/'+date.getFullYear()+' '+date.getHours()+':'+date.getMinutes();  // 12/1/2013 13:46 
<div id=dte><script>document.write(formatDate('/Date(1225243290011)/'));</script></div>  </body>