title: Alter output of ServiceStack.Text JSON Deserializer
body: <p>I'm currently using the <code>Newtonsoft.json</code> nuget package but I'd like to find a faster alternative.  <code>ServiceStack.Text</code> seems to parse it, but it's returning the JSON in a different format that I'm expecting.  Is there anyway to change the format in which this returns the object to match what I'm expecting?  </p>
  
  <p><strong>The problem is</strong> that after deserializing, <code>response.fullName</code> returns "joey cool" as expected for <code>Newtonsoft.json</code> but the <code>ServiceStack.Text</code> will return a <code>null</code> because the format is different.</p>
  
  <p>Can I alter the outputting format of the <code>ServiceStack.Text</code> so that it matches what I'm expecting?  I want to call <code>response.fullName</code> and get "joey cool".</p>
  
  <p><strong>Here is my code using the <code>ServiceStack.Text</code> component:</strong></p>
  
  <pre><code>T response = a_response.Content.FromJson&lt;T&gt;();
  </code></pre>
  
  <p><strong>Here is my code using <code>Newtonsoft.json</code>:</strong></p>
  
  <pre><code>T response = JsonConvert.DeserializeObject&lt;T&gt;(a_response.Content);
  </code></pre>
  
  <p><strong>Below is how the JSON in text looks as output:</strong></p>
  
  <blockquote>
    <p>{
      "userId": "fc7b4c4e0b6660c7daf711b1d17e0039",
      "emailAddress": "joey+100@stringify.com",
      "fullName": "joey cool",
      "accountType": "individual",
      "createdDate": 1440104822411,
      "phoneNumber": "15555555555",
      "timezone": "America/Los_Angeles",
      "photo": "<a href="https://stringify.s3.amazonaws.com/users/fc7b4c4e0b6660c7daf711b1d17e0039-profile.jpg" rel="nofollow noreferrer">https://stringify.s3.amazonaws.com/users/fc7b4c4e0b6660c7daf711b1d17e0039-profile.jpg</a>",
      "name": "default",
      "type": "api"
    }</p>
  </blockquote>
  
  <p><strong>Below is how the debugger shows the <code>Newtonsoft.json</code> object:</strong>
  <a href="https://i.stack.imgur.com/RhNsZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RhNsZ.png" alt="enter image description here"></a></p>
  
  <p><strong>Below is how your <code>ServiceStack.Text</code> JSON Deserializer shows the response object:</strong> 
  <a href="https://i.stack.imgur.com/ugxLR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ugxLR.png" alt="enter image description here"></a></p>
  
  <p>----EDIT----
  Tried 4.0.62 from NuGet and it gives me an exception.</p>
  
  <p>Message: The type initializer for 'ServiceStack.StringExtensions' threw an exception.  Object reference not set to instance of an object,   at ServiceStack.StringExtensions..cctor () [0x00017] in :0 </p>
  
  <p><a href="https://i.stack.imgur.com/v5Gzo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v5Gzo.png" alt="enter image description here"></a></p>
  
  <p>-----EDIT----- </p>
  
  <p><a href="https://www.dropbox.com/s/vpi3de58a6agvr5/ViewControllerToUpload.cs?dl=0" rel="nofollow noreferrer">URL to a file containing the JSON class</a></p>
  
  <p><a href="https://youtu.be/Lr5hbuUm5dA" rel="nofollow noreferrer">Here's a video demonstrating the usage differences and the strange output</a></p>