diff --git a/xobject.go b/xobject.go index 2edfe93..fde7ab4 100644 --- a/xobject.go +++ b/xobject.go @@ -35,6 +35,9 @@ func (this *XObject) Size() int { if (this._type == XOT_ARRAY) { array := this._val.([]*XObject) return len(array) + } else if (this._type == XOT_OBJECT) { + object := this._val.(map[string]*XObject) + return len(object) } else { panic("XObject.Size type error") return 0