class Program
{
static void Main(string[] args)
{
string json = JsonConvert.SerializeObject(new Account { Name = "test" }, Newtonsoft.Json.Formatting.Indented,
new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.All, PreserveReferencesHandling = PreserveReferencesHandling.Objects });
Console.Out.Write(json);
while (true)
{
}
}
}
class Account {
public String Name;
}
ねえ、私はJsonに入ろうとしています。オブジェクトを逆シリアル化したい。文字列から型情報を取得したい。したがって、逆シリアル化するときは、jsonがタイプを指定せずにそれ自体で認識できるようにします。それは可能ですか?
よろしく、ブライアン