Author: cziegeler
Date: Sat Aug 10 12:02:03 2013
New Revision: 1512659

URL: http://svn.apache.org/r1512659
Log:
SLING-3008 :  Render resource type (and super type) if resource can't be 
adapted to a map in JSON 

Modified:
    
sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonObjectCreator.java

Modified: 
sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonObjectCreator.java
URL: 
http://svn.apache.org/viewvc/sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonObjectCreator.java?rev=1512659&r1=1512658&r2=1512659&view=diff
==============================================================================
--- 
sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonObjectCreator.java
 (original)
+++ 
sling/trunk/bundles/servlets/get/src/main/java/org/apache/sling/servlets/get/impl/helpers/JsonObjectCreator.java
 Sat Aug 10 12:02:03 2013
@@ -26,7 +26,6 @@ import java.util.Iterator;
 import java.util.Locale;
 import java.util.Map;
 
-import org.apache.sling.api.SlingConstants;
 import org.apache.sling.api.resource.Resource;
 import org.apache.sling.api.resource.ResourceUtil;
 import org.apache.sling.api.resource.ValueMap;
@@ -83,10 +82,10 @@ public abstract class JsonObjectCreator 
 
             }
             if ( resource.getResourceType() != null ) {
-                obj.put(SlingConstants.PROPERTY_RESOURCE_TYPE, 
resource.getResourceType());
+                obj.put("sling:resourceType", resource.getResourceType());
             }
             if ( resource.getResourceSuperType() != null ) {
-                obj.put(SlingConstants.PROPERTY_RESOURCE_SUPER_TYPE, 
resource.getResourceSuperType());
+                obj.put("sling:resourceSuperType", 
resource.getResourceSuperType());
             }
 
         } else {


Reply via email to