+ Start a Discussion

regarding displaying rest json data on browser

hi guys i wrote a rest program like this 


global with sharing class restclass
   global static list<Account> getaccount()
       list<Account> acclist = new list<Account>([Select id,Name,billingcity
       from account]);
       return acclist;


but i want to display data on browser like if some one hit the method  url it has to display json data regarding all accounts

please help me to solve this issue