c# - Return json without binding it to object using web client -


i want return jsonresult in c# online api service (itunes). wanting go out data in json format , return exact data in same json format can play in javascript.

here have:

public jsonresult index()         {             using (var client = new webclient())             {                 var json = client.downloadstring("https://itunes.apple.com/lookup?id=909253");                  return json;             }          } 

i noticing can't return json because string. don't want bind model!!! want return json object how got it.

change method signature return string instead of jsonresult object…

public string index() {     using (var client = new webclient())     {         return client.downloadstring("https://itunes.apple.com/lookup?id=909253");     } } 

Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -