if(useEO) {
destination = new JSONObject();
destination.put("eo", eoData);
state.push(source, eoData, "eo");
}
EOClassDescription cd = source.classDescription();
NSArray<String> attributeNames = _readableAttributeNames(source);
NSArray<String> relationshipNames = _includedRelationshipNames(source);
for (Enumeration e = attributeNames.objectEnumerator(); e.hasMoreElements();) {
String key = (String) e.nextElement();
Object jsonValue;
if(cd.toManyRelationshipKeys().containsObject(key)) {
if (relationshipNames.containsObject(key)) {
Object value = source.valueForKey(key);
jsonValue = ser.marshall(state, source, value, key);
}
else {
// JSONObject rel = new JSONObject();
// rel.put("javaClass", "com.webobjects.eocontrol.EOArrayFault");
// rel.put("sourceGlobalID", destination.get("gid"));
// rel.put("relationshipName", key);
// jsonValue = rel;
jsonValue = null;
}
} else if (cd.toOneRelationshipKeys().containsObject(key)) {
if (relationshipNames.containsObject(key)) {
Object value = source.valueForKey(key);
jsonValue = ser.marshall(state, source, value, key);
}
else {