function createObjectStub_(jsonObj, functionMap) {
  switch (jsonObj['type']) {
    case 'Map':
      return Object.create(null);
    case 'Object':
      return {};
    case 'ScopeReference':
      return Interpreter.SCOPE_REFERENCE;
    case 'Function':
      var obj = functionMap[jsonObj['id']];
      if (!obj) {
        throw RangeError('Function ID not found: ' + jsonObj['id']);
      }
      return obj;
    case 'Array':
      // Currently we assume that Arrays are not sparse.
      return [];
    case 'Date':
      var obj = new Date(jsonObj['data']);
      if (isNaN(obj)) {
        throw TypeError('Invalid date: ' + jsonObj['data']);
      }
      return obj;
    case 'RegExp':
      return RegExp(jsonObj['source'], jsonObj['flags']);
    case 'PseudoObject':
      return new Interpreter.Object(null);
    case 'Scope':
      return new Interpreter.Scope(undefined, undefined, undefined);
    case 'State':
      return new Interpreter.State(undefined, undefined);
    case 'Task':
      return new Interpreter.Task(undefined, [], null, null, -1);
    case 'Node':
      var obj = new NODE_CONSTRUCTOR();
      delete obj.start;
      delete obj.end;
      var locText = jsonObj['loc'];
      if (locText) {
        obj.loc = decodeLoc_(locText);
      }
      return obj;
  }
  throw TypeError('Unknown type: ' + jsonObj['type']);
}
Given the JSON description of an object, create the object.
But don't populate its properties yet.
@param {!Object} jsonObj JSON description of object.
@param {!Object} functionMap Map of ID to native functions.
@returns {!Object} Stub of real object.
@private