title: What should be the correct response from web service to display the Jquery token input results?
body: <p>I am using a Jquery Token Input plugin. I have tried to fetch the data from the database instead of local data. My web service returns  the json result is wrapped in xml:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;string xmlns="http://tempuri.org/"&gt;[{"id":"24560","name":"emPOWERed-Admin"},{"id":"24561","name":"emPOWERed-HYD-Visitors"}]&lt;/string&gt;
  </code></pre>
  
  <p>I have checked in the site <a href="http://loopj.com/jquery-tokeninput/" rel="nofollow">http://loopj.com/jquery-tokeninput/</a> which says that the script should output JSON search results in the following format:</p>
  
  <pre><code>[
      {"id":"856","name":"House"},
      {"id":"1035","name":"Desperate Housewives"}
  ]
  </code></pre>
  
  <p>Both seems to be the same,but still i m not getting the items displayed in my page.</p>
  
  <p>I am posting my code also.
  My Js code: DisplayTokenInput.js</p>
  
  <pre><code> $(document).ready(function() {
       $("#textboxid").tokenInput('PrivateSpace.asmx/GetDl_info', {
  
              hintText: "Type in DL Name", theme: "facebook",
              preventDuplicates: true,
              searchDelay: 200
  
              });
      });
  </code></pre>
  
  <p>My web-service code:</p>
  
  <pre><code>[WebMethod]
  
      [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)]
       public string GetDl_info(string q)
      {
          string dl_input = string.Empty;
          DataSet ds;
          PSData ObjDl = new PSData();
          ds = ObjDl.GetDistributionList(q);
  
          List&lt;DistributionList&gt; DLObj = new List&lt;DistributionList&gt;();
  
  
          foreach (DataRow datarow in ds.Tables[0].Rows)
          {
              DistributionList dl_list = new DistributionList();
              dl_list.id = Convert.ToString(datarow["id"]);
              dl_list.name = Convert.ToString(datarow["name"]);
  
              DLObj.Add(dl_list);
          }
  
          dl_input = JsonConvert.SerializeObject(DLObj);
  
          return dl_input;
  
      }
  
   }
  public class DistributionList
      {
          public string id { get; set; }
          public string name { get; set; }
      }
  </code></pre>
  
  <p>I am posting the head portion of aspx code to show the library files i have included:</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
    &lt;title&gt;Untitled Page&lt;/title&gt;
    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  
     &lt;link href="../Styles/jquery-ui-1.8.20.custom.css" rel="stylesheet" type="text/css" /&gt;
        &lt;link href="../Styles/token-input.css" rel="stylesheet" type="text/css" /&gt;
  
      &lt;link href="../Styles/token-input-facebook.css" rel="stylesheet" type="text/css" /&gt;
  
      &lt;script src="Scripts/Lib/jquery-1.7.2.min.js" type="text/javascript"&gt;&lt;/script&gt;  
  
      &lt;script src="../Scripts/jquery.tokeninput.js" type="text/javascript"&gt;&lt;/script&gt;--%&gt;
  
      &lt;script src="DisplayTokenInput.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;head&gt;
  </code></pre>