code: function(packedValue)
      {
  
          var result;
  
          var t = typeof(packedValue);
          if (t == "number" || t == "string" || t == "boolean" || packedValue == null || packedValue == undefined)
          {
              result = this.handleError(packedValue);
          }
          else if (packedValue instanceof Array)
          {
              result = [];
              for (var i = 0; i < packedValue.length; i++)
              {
                  result[i] = this.deserialize(packedValue[i]);
              }
          }
          else if (t == "object")
          {
              for(var i = 0; i < packedValue.newTypes.length; i++)
              {
                  this.addTypeDataToCache(packedValue.newTypes[i]);
              }
              for (var aRefID in packedValue.newRefs)
              {
                  this.createProxy(aRefID, packedValue.newRefs[aRefID]);
              }
              if (packedValue.type == FABridge.TYPE_PRIMITIVE)
              {
                  result = packedValue.value;
              }
              else if (packedValue.type == FABridge.TYPE_ASFUNCTION)
              {
                  result = this.getFunctionProxy(packedValue.value);
              }
              else if (packedValue.type == FABridge.TYPE_ASINSTANCE)
              {
                  result = this.getProxy(packedValue.value);
              }
              else if (packedValue.type == FABridge.TYPE_ANONYMOUS)
              {
                  result = packedValue.value;
              }
          }
          return result;
      }
docs: on deserialization we always check the return for the specific error code that is used to marshall NPE's into JS errors the unpacking is done by returning the value on each pachet for objects/arrays