これは単純なはずですが、明らかにトリックがありません。私はPOCOを持っています:
public class job
{
public string title { get; set; }
public string company { get; set; }
public string companywebsite { get; set; }
public string[] locations { get; set; }
}
RestSharp を使用して XML にシリアル化しています。私は次のいずれかを取得したいと考えています:
<job>
<title>Hello title</title>
<company>Hello company</company>
<locations>New York</locations>
<locations>Los Angeles</locations>
<locations>Detroit</locations>
</job>
それとも理想...
<job>
<title>Hello title</title>
<company>Hello company</company>
<locations>
<location>New York</location>
<location>Los Angeles</location>
<location>Detroit</location>
</locations>
</job>
しかし、代わりにこれを取得しています:
<job>
<title>Hello title</title>
<company>Hello company</company>
<locations>
<String />
<String />
<String />
</locations>
</job>
明らかに、POCO は異なる必要があります。私に何ができる?