Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Json : Object和Dictionary中对使用了Adaptor的类的处理 #29

Closed
larlf opened this issue Apr 11, 2017 · 1 comment
Closed

Json : Object和Dictionary中对使用了Adaptor的类的处理 #29

larlf opened this issue Apr 11, 2017 · 1 comment

Comments

@larlf
Copy link

larlf commented Apr 11, 2017

测试用例如下:

class MyTest1
{
	public static void UnitTest_JsonMap()
	{
		string json = "{\"Items\":{\"one\":{\"Type\":\"OneType\"},\"two\":{\"Type\":\"TwoType\"}}}";
		MyTestDataMap data =JsonMapper.ToObject<MyTestDataMap> (json);
		Console.WriteLine("Type : "+data.Items["one"].Type);
	}
}

class MyTestDataItem : TestClass3
{
	public string Type;
}

class MyTestDataMap : TestClass3
{
	public Dictionary<string, MyTestDataItem> Items;
}
@liiir1985
Copy link
Collaborator

已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants