return object;
}
public Object marshalJSONDocumentArray(JSON.Array<Value> jsonArray, Class<?> objectClass) throws JSONMarshalerException {
int size = jsonArray.size();
ReflectType type = ReflectType.inspectObjectType(objectClass);
if (type == ReflectType.OBJECT) {
return marshalJSONDocumentList(jsonArray, objectClass);
} else {
Class<?> componentClass = objectClass.getComponentType();
ReflectType componentType = ReflectType.inspectObjectType(componentClass);
Object array = Array.newInstance(componentClass, size);
for (int i = 0; i < size; i++) {
Value value = jsonArray.get(i);
if (value.getValueType() == Value.TYPE.OBJECT) {
Array.set(array, i, marshalJSONDocumentObject((JSON.Object<CharSequence, Value>) value, componentClass));