fixes JSON representation of empty objects (closes #43)