Example code for json webservice