Permalink
Browse files

returning type in the JSON representation of a schema

  • Loading branch information...
1 parent 68c17dc commit c3cc32b2e2b304fe99bea8d379b3af1d9b99b1f0 @antoniogarrote committed Jun 23, 2010
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/plaza/rest/core.clj
View
@@ -409,8 +409,11 @@
(if (nil? pred) acum
(assoc acum pred value)))
(let [pred (property-alias schema (str p))]
- (if (nil? pred) acum
- (assoc acum pred (str o))))))
+ (if (nil? pred)
+ (if (= (str p) rdf:type)
+ (assoc acum :type (str o))
+ (assoc acum (str p) (str o)))
+ (assoc acum pred (str o))))))
{} tss)]
(assoc jsts :uri (str s))))
gts)))))))

0 comments on commit c3cc32b

Please sign in to comment.