我们有这个代码:
// using ServiceStack JSONSerializer
string typeInfoString = JsonSerializer.SerializeToString<Type>(typeof(HashSet<string>));
// yields "System.Collections.Generic.HashSet`1[[System.String, mscorlib]], System.Core"
// this string is the same thing, so it's probably valid json
string jsonTypeInfo = typeof(HashSet<string>).ToJson();
// this should work, I feel like
Type desType = JsonSerializer.DeserializeFromString<Type>(jsonTypeInfo);
// but desType ends up being null :(
关于 HashSet 类型是否有一些 ServiceStack 陷阱?