void VariableSerializer::write(CObjRef v) { if (!v.isNull() && m_type == JSON) { Array props = v->o_toArray(); ClassInfo::PropertyVec properties; ClassInfo::GetClassProperties(properties, v->o_getClassName()); for (ClassInfo::PropertyVec::const_iterator iter = properties.begin(); iter != properties.end(); ++iter) { if ((*iter)->attribute & ClassInfo::IsProtected) { props.remove((*iter)->name); } } // Remove private props for (ArrayIter it(props); !it.end(); it.next()) { if (it.first().toString().charAt(0) == '\0') { props.remove(it.first()); } } setObjectInfo(v->o_getClassName(), v->o_getId()); props.serialize(this); } else { v.serialize(this); } }