changed viewfactory to show the json (not working yet)