title: How to avoid replacing space for "_x0020_"?
body: <p>I am using WCF and some of my methods return a class that, when converted to JSON, generate an object like this:</p>
  
  <pre><code>{
      "__type": "Data:#MyNamespace.Model"
      "Dado_x0020_1": "1"
      "Dado_x0020_2": "2"
      "Dado_x0020_3": "3"
  }
  </code></pre>
  
  <p>I can clearly remember that it wasn't like this before, WCF wouldn't replace the space character for "_x0020_". The problem is that I have no idea what changed in my code to make this happen. I don't recall changing any configuration that would cause this. Any ideas?</p>
  
  <p>This is the code of my class. It's simply a way to allow an object with variable attribute names and count:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Runtime.Serialization;
  
  namespace MyNamespace.Model
  {
      [Serializable]
      public class Data : ISerializable
      {
          internal Dictionary&lt;string, object&gt; Attributes { get; set; }
  
          public Data()
          {
              Attributes = new Dictionary&lt;string, object&gt;();
          }
  
          protected Data(SerializationInfo info, StreamingContext context)
              : this()
          {
              SerializationInfoEnumerator e = info.GetEnumerator();
              while (e.MoveNext())
              {
                  Attributes[e.Name] = e.Value;
              }
          }
  
          public void GetObjectData(SerializationInfo info, StreamingContext context)
          {
              foreach (string key in Attributes.Keys)
              {
                  info.AddValue(key, Attributes[key]);
              }
          }
  
          public void Add(string key, object value)
          {
              Attributes.Add(key, value);
          }
  
          public object this[string index]
          {
              set { Attributes[index] = value; }
              get
              {
                  if (Attributes.ContainsKey(index))
                      return Attributes[index];
                  else
                      return null;
              }
          }
      }
  }
  </code></pre>