java - Convert JSON Object response to JSONP -


returing jsonobject right restful webservice using jersey. working fine , returning jssonobject follows.

@get @path("/logingetvalues") @produces({"application/x-javascript"}) public jsonobject getvalues(@queryparam("request") string request)   { ...           jsonobject value = new jsonobject();           value = null ;           return value ;          } 

but intending convert response jsonp response , tried append callback function (as following refering ( here) not getting required response , indeed asking define @jsonp annotation . if have define callback how , have ! kindly jsonp response

@get @jsonp(queryparam="callback") @path("/logingetvalues") @produces({"application/x-javascript"}) public jsonwithpadding getvalues( @queryparam("callback") string callback ,@queryparam("request") string request)   { ...           jsonobject value = new jsonobject();           value = null ;          return new jsonwithpadding(value , callback);          } 


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -

delphi - Indy UDP Read Contents of Adata -