title: ServiceStack.Text DynamicJson fails to parse an array
body: <p>Running the following code:</p>
  
  <pre><code>var s = @"{ ""simple"": ""value"", ""obj"": { ""val"":""test"" }, ""array"": []";
  var dyn = DynamicJson.Deserialize(s);
  Console.WriteLine(dyn.simple);
  Console.WriteLine(dyn.obj);
  Console.WriteLine(dyn.obj.val);
  Console.WriteLine(dyn.array);
  </code></pre>
  
  <p>Prints:</p>
  
  <pre><code>"value"
  {"val":"test"}
  base {System.Dynamic.DynamicObject}: {"val":"test"}
  "test"
  "[]"
  </code></pre>
  
  <p>Which means <code>dyn.obj</code> returns an object so I can continue to navigate through it but <code>dyn.array</code> returns a <code>string</code>. Meaning I cannot iterate through the list of objects inside.</p>
  
  <p>What am I missing?</p>
  
  <p>EDIT</p>
  
  <p>I think I have found the issue. Looking in github in <code>Pcl.Dynamic.cs</code> method <code>YieldMember</code> does the following:</p>
  
  <pre><code>private bool YieldMember(string name, out object result)
  {
      if (_hash.ContainsKey(name))
      {
          var json = _hash[name].ToString();
          if (json.TrimStart(' ').StartsWith("{", StringComparison.Ordinal))
          {
              result = Deserialize(json);
              return true;
          }
          result = json;
          return _hash[name] == result;
      }
      result = null;
      return false;
  }
  </code></pre>
  
  <p>It takes care of converting values starting with <code>{</code> into a deserialized (dynamic) object.</p>
  
  <p>I know @mythz looks at questions in StackOverflow so maybe he can chime in with his thoughts. Seems pretty simple to handle when the json starts with <code>[</code> right?</p>
  
  <p>EDIT 2</p>
  
  <p>I'm considering this a bug. So I've made the fix in the code and submitted a pull request. In case anyone is curious:</p>
  
  <p><a href="https://github.com/ServiceStack/ServiceStack.Text/pull/442" rel="nofollow">https://github.com/ServiceStack/ServiceStack.Text/pull/442</a></p>