storeReference(object);
// Create new map out of bean properties
BeanMap beanMap = new BeanMap(object);
// Set of bean attributes
Set<BeanMap.Entry<?, ?>> set = beanMap.entrySet();
if ((set.size() == 0) || (set.size() == 1 && beanMap.containsKey("class"))) {
// BeanMap is empty or can only access "class" attribute, skip it
writeArbitraryObject(object, serializer);
return;
}