}
protected Object convertJsonToJavaScript(Object value, String id) {
String fullId = (id.startsWith("http://") || id.startsWith("https://")) ? id : (getId() + '/' + id);
if (value instanceof Map || value instanceof List){
if (value instanceof Map && ((Map)value).containsKey("$ref")){
Identification refId = Identification.idForRelativeString(fullId, (String) ((Map)value).get("$ref"));
if(refId instanceof ObjectId && ((ObjectId)refId).subObjectId == null){
refId = ObjectId.idForObject(DataSourceManager.getMetaClassSource(), ((ObjectId)refId).source.getId());
}
return refId;
}
Identification objId;
if (value instanceof Map && ((Map)value).containsKey("id") && useIds())
objId= Identification.idForRelativeString(fullId, (String) ((Map)value).get("id"));
else
objId = ObjectId.idForObject(this, id, true);
if(!(objId instanceof ObjectId))