             return String(obj);
         }
 
-        if (obj is Array || Util.isPlainObject(obj)) {
+        var isDictionary :Boolean = obj is Dictionary;
+        if (obj is Array || isDictionary || Util.isPlainObject(obj)) {
             if (refs == null) {
                 refs = new Dictionary();
 


import flash.utils.ByteArray;
import flash.utils.Dictionary;

public class StringUtil
{

                    }
                    s += prop + "=>" + toString(obj[prop], refs);
                }
                return (isDictionary ? "Dictionary" : "Object") + "(" + s + ")";
            }

        } else if (obj is XML) {
