Code now generates JSON data for newsfeeds