diff --git a/SpeckleCore/Converter.cs b/SpeckleCore/Converter.cs index b191fff..7147ad1 100644 --- a/SpeckleCore/Converter.cs +++ b/SpeckleCore/Converter.cs @@ -203,11 +203,18 @@ public static object Deserialise( SpeckleObject obj, object root = null ) { try { - var mySubList = Activator.CreateInstance( prop != null ? prop.PropertyType : field.FieldType ); - foreach ( var myObj in ( ( IEnumerable ) value ) ) - mySubList.GetType().GetMethod( "Add" ).Invoke( mySubList, new object[ ] { myObj } ); + if ( prop.PropertyType.IsArray || field.FieldType.IsArray ) + { + value = ( ( List ) value ).ToArray(); + } + else + { + var mySubList = Activator.CreateInstance( prop != null ? prop.PropertyType : field.FieldType ); + foreach ( var myObj in ( ( IEnumerable ) value ) ) + mySubList.GetType().GetMethod( "Add" ).Invoke( mySubList, new object[ ] { myObj } ); - value = mySubList; + value = mySubList; + } } catch { } }