title: how to Return json format in wcf
body: <p>iam new to the wcf. iam developing wcf restful </p>
  
  <p>iam returning string by serializing into json format by using the below code</p>
  
  <pre><code>public string ConvertDataTabletoString()
      {
          DataTable dt = new DataTable();
          using (SqlConnection con = new SqlConnection("Data Source=mar-pc;database=user;User    ID=sa;Password=123123;"))
          {
              using (SqlCommand cmd = new SqlCommand("select title=tname,tid=taddress from userdetails where userid='1'", con))
              {
                  con.Open();
                  SqlDataAdapter da = new SqlDataAdapter(cmd);
                  da.Fill(dt);
                  System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
                  List&lt;Dictionary&lt;string, object&gt;&gt; rows = new List&lt;Dictionary&lt;string, object&gt;&gt;();
                  Dictionary&lt;string, object&gt; row;
                  foreach (DataRow dr in dt.Rows)
                  {
                      row = new Dictionary&lt;string, object&gt;();
                      foreach (DataColumn col in dt.Columns)
                      {
                          row.Add(col.ColumnName, dr[col]);
                      }
                      rows.Add(row);
                  }
                  return serializer.Serialize(rows);
              }
          }
      }
  </code></pre>
  
  <p>where iam getting the result as </p>
  
  <p>"[{\"title\":\"Sathyam\",\"tid\":\"NiZamabad\"}]"</p>
  
  <p>i want to get the result as </p>
  
  <p>{"title":"Sathyam","tid":"Nizamabad"}</p>
  
  <p>iam the operation contract and  </p>
  
  <pre><code> [OperationContract]
      [WebInvoke(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "MyGetData/{value}/{password}")]
  </code></pre>
  
  <p>Help me i tried bodystyle as wrapped also no </p>