@@ -72,7 +72,6 @@ public static object ObjectStringToType(string strType)
7272
7373 public static Type ExtractType ( string strType )
7474 {
75- var typeAttrInObject = Serializer . TypeAttrInObject ;
7675 if ( strType == null || strType . Length <= 1 ) return null ;
7776
7877 var hasWhitespace = JsonUtils . WhiteSpaceChars . Contains ( strType [ 1 ] ) ;
@@ -83,6 +82,7 @@ public static Type ExtractType(string strType)
8382 strType = "{" + strType . Substring ( pos ) ;
8483 }
8584
85+ var typeAttrInObject = Serializer . TypeAttrInObject ;
8686 if ( strType . Length > typeAttrInObject . Length
8787 && strType . Substring ( 0 , typeAttrInObject . Length ) == typeAttrInObject )
8888 {
@@ -234,10 +234,18 @@ internal class TypeAccessor
234234
235235 public static Type ExtractType ( ITypeSerializer Serializer , string strType )
236236 {
237- var typeAttrInObject = Serializer . TypeAttrInObject ;
237+ if ( strType == null || strType . Length <= 1 ) return null ;
238+
239+ var hasWhitespace = JsonUtils . WhiteSpaceChars . Contains ( strType [ 1 ] ) ;
240+ if ( hasWhitespace )
241+ {
242+ var pos = strType . IndexOf ( '"' ) ;
243+ if ( pos >= 0 )
244+ strType = "{" + strType . Substring ( pos ) ;
245+ }
238246
239- if ( strType != null
240- && strType . Length > typeAttrInObject . Length
247+ var typeAttrInObject = Serializer . TypeAttrInObject ;
248+ if ( strType . Length > typeAttrInObject . Length
241249 && strType . Substring ( 0 , typeAttrInObject . Length ) == typeAttrInObject )
242250 {
243251 var propIndex = typeAttrInObject . Length ;
0 commit comments