title: .svc webservice returns d json object
body: <p>Im calling a .net svc service from jquery using Bootstrapvalidator.com. Im using the remote option to check if a username is already taken or not, see here: <a href="http://bootstrapvalidator.com/validators/remote/" rel="nofollow">http://bootstrapvalidator.com/validators/remote/</a></p>
  
  <p>The thing is dat my .svc services is returning the bool value like: {"d":true} while bootstrapvalidator is expecting {"valid":true}. I've read somewhere that microsoft uses the d for security reasons but i cant find this article anymore.</p>
  
  <p>Question is, will i be able to return {"valid":true} or will my result always be {"d":true}. If the latter one is the case then i want to try to make the output like: {"d": [ "valid" : true ] } and hopefully bootstrapvalidator will do a .find for valid and maybe this will work. But im not sure how to create the output like that.</p>
  
  <p>function:</p>
  
  <pre><code>public bool CheckUsername(string userName) {
      try {
          using (var dbC = new DataContext(ConfigurationManager.ConnectionStrings[_environment].ToString())) {
              bool valid = false;
              var check = dbC.UserSelectByUsername(userName).ToList();
              if (check.Count() &gt; 0) {
                  return valid;
                  }
              else {
                  return valid = true;
                  }
              }
          }
      catch (Exception exc) {
          Log.Error("Error in .", exc);
          return false;
      }           
  }
  </code></pre>