<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=408229&amp;view=findpost&amp;p=3657195</guid>
        <pubDate>Fri, 04 Mar 2016 07:49:45 +0000</pubDate>
        <title>десериализация json с изменяемым названием поля</title>
        <link>https://forum.sources.ru/index.php?showtopic=408229&amp;view=findpost&amp;p=3657195</link>
        <description><![CDATA[VahaC: есть вот такой json <br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">{&quot;status&quot;:&quot;ok&quot;,&quot;meta&quot;:{&quot;count&quot;:2},&quot;data&quot;:{&quot;110715&quot;:{&quot;periphery_id&quot;:102},&quot;110710&quot;:{&quot;periphery_id&quot;:107}}}</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
пытаюсь описать его следующими класами<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;&nbsp; &nbsp;public class Meta</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[JsonProperty(&quot;count&quot;)]</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public int Count { get; set; }</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;public class Info</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[JsonProperty(&quot;periphery_id&quot;)]</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public int PeripheryId { get; set; }</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;public class Data</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[JsonProperty(//что указать здесь у меня ведь значения разные 110715 или 110710)]</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public Info Info { get; set; }</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp;public class Structure</div><div class="code_line">&nbsp;&nbsp; &nbsp;{</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[JsonProperty(&quot;status&quot;)]</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public string Status { get; set; }</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[JsonProperty(&quot;meta&quot;)]</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public Meta Meta { get; set; }</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[JsonProperty(&quot;data&quot;)]</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public Data Data { get; set; }</div><div class="code_line">&nbsp;&nbsp; &nbsp;}</div></ol></div></div></div></div><br>
<br>
как мне описать одним классом объекты<br>
&quot;110715&quot;:{&quot;periphery_id&quot;:102},<br>
&quot;110710&quot;:{&quot;periphery_id&quot;:107}]]></description>
        <author>VahaC</author>
        <category>.NET: Web приложения</category>
      </item>
	
      </channel>
      </rss>
	