$this->setDefault(self::PROPERTY_TOTAL, count($this->rows));
            }
            foreach ($this->defaults as $k => $v) {
                if (isset($this->meta[$k])) {
                    $doc[$this->meta[$k]] = $v;
                } else {
                    $doc[$k] = $v;
                }
            }
        }
        $doc[$this->meta[self::PROPERTY_ROOT]] = $this->rows;
        foreach ($this->misc as $name => $data) {
            $doc[$name] = $data;
        }
    }
    protected function docDefaults()
    {
        $this->setMeta(self::PROPERTY_ID, 'id');
        $this->setMeta(self::PROPERTY_ROOT, 'rows');
        $this->setMeta(self::PROPERTY_SUCCESS, 'success');
        $this->setMeta(self::PROPERTY_TOTAL, 'total');
        // $this->setMeta(self::PROPERTY_SORTINFO, new stdClass());
        $this->setSuccess(false);
        $this->setDefault(self::PROPERTY_TOTAL, 0);
    }
}
// Lazy initialisation
AppKitExtJsonDocument::initializeStaticData();
class AppKitExtJsonDocumentException extends AppKitException
{
}