code: function writeObject(rh, obj, to, identify) {
              if (typeof to === "undefined") { to = ''; }
              if (typeof identify === "undefined") { identify = false; }
              shared.utils.dassert(shared.utils.isObjectOrArray(rh));
              shared.utils.dassert(shared.utils.isObjectOrArray(obj));
              if(obj instanceof Array) {
                  to += '[';
              } else {
                  to += '{';
              }
              if(identify) {
                  to += rh.valueId(obj) + ' ';
                  to += rh.valueRev(obj) + ' ';
              }
              var k = Object.keys(obj);
              for(var i = 0; i < k.length; i++) {
                  to = writeValue(rh, k[i], to);
                  to += ":";
                  to = writeValue(rh, obj[k[i]], to);
                  if(i < k.length - 1) {
                      to += ',';
                  }
              }
              if(obj instanceof Array) {
                  to += ']';
              } else {
                  to += '}';
              }
              return to;
          }
docs: /*
  Append serialized form of an object/array onto the supplied string.
  Returns the passed string.