diff --git a/javasource/restservices/util/JsonDeserializer.java b/javasource/restservices/util/JsonDeserializer.java index 09066cb..3484956 100644 --- a/javasource/restservices/util/JsonDeserializer.java +++ b/javasource/restservices/util/JsonDeserializer.java @@ -149,9 +149,8 @@ private static Map buildAttributeNameMap(IMetaObject metaObject) for(IMetaAssociation assoc : metaObject.getMetaAssociationsParent()) { String name = assoc.getName().split("\\.")[1]; - attrMap.put(name.toLowerCase(), assoc.getName()); - if (name.startsWith("_")) - attrMap.put(name.substring(1).toLowerCase(), assoc.getName()); + name = name.toLowerCase().replaceAll("^_+(?!$)", ""); // Replace leading underscores + attrMap.put(name, assoc.getName()); } for(IMetaPrimitive prim : metaObject.getMetaPrimitives()) {