code: private Object parseObject(
              JsonEvent event,
              Class<?> inputDeclaredType,
              MetaProperty<?> metaProp,
              Class<?> beanType,
              SerIterable parentIterable,
              boolean rootType) throws Exception {
  
          // avoid nulls
          Class<?> declaredType = (inputDeclaredType == null ? Object.class : inputDeclaredType);
          // establish type
          if (event == JsonEvent.OBJECT) {
              event = input.readEvent();
              if (event == JsonEvent.STRING) {
                  String key = input.parseObjectKey();
                  if (key.equals(BEAN)) {
                      return parseTypedBean(declaredType, rootType);
                  } else if (key.equals(TYPE)) {
                      return parseTypedSimple(declaredType);
                  } else if (key.equals(META)) {
                      return parseTypedMeta();
                  } else {
                      input.pushBack('"');
                      input.pushBackObjectKey(key);
                      event = JsonEvent.OBJECT;
                  }
              } else if (event == JsonEvent.OBJECT_END) {
                  input.pushBack('}');
                  event = JsonEvent.OBJECT;
              } else {
                  throw new IllegalArgumentException("Invalid JSON data: Expected JSON object end but found " + event);
              }
          }
          // parse based on type
          if (Bean.class.isAssignableFrom(declaredType)) {
              if (event == JsonEvent.OBJECT) {
                  return parseBean(input.readEvent(), declaredType);
              } else {
                  return parseSimple(event, declaredType);
              }
          } else {
              if (event == JsonEvent.OBJECT || event == JsonEvent.ARRAY) {
                  SerIterable childIterable = null;
                  if (metaProp != null) {
                      childIterable = settings.getIteratorFactory().createIterable(metaProp, beanType, true);
                  } else if (parentIterable != null) {
                      childIterable = settings.getIteratorFactory().createIterable(parentIterable);
                  }
                  if (childIterable == null) {
                      if (event == JsonEvent.ARRAY) {
                          childIterable = parseUnknownArray(declaredType);
                      } else {
                          childIterable = parseUnknownObject(declaredType);
                      }
                  }
                  return parseIterable(event, childIterable);
              } else {
                  return parseSimple(event, declaredType);
              }
          }
      }
docs: parse object, event passed in