final JsonRepresentation objectRepr = DomainResourceHelper.readAsMap(objectStr);
if (!objectRepr.isMap()) {
throw JsonApplicationException.create(HttpStatusCode.BAD_REQUEST, "Body is not a map; got %s", objectRepr);
}
final LinkRepresentation describedByLink = objectRepr.getLink("links[rel=describedby]");
if (!describedByLink.isLink()) {
throw JsonApplicationException.create(HttpStatusCode.BAD_REQUEST, "Could not determine type of domain object to persist (no links[rel=describedby] link); got %s", objectRepr);
}
final String domainTypeStr = UrlParserUtils.domainTypeFrom(describedByLink);
if (domainTypeStr == null) {