From ae8d7d9326b84dd8b4769d190c003e599e915086 Mon Sep 17 00:00:00 2001 From: Jon Brisbin Date: Tue, 4 Sep 2012 10:17:40 -0500 Subject: [PATCH] DATAREST-41 Fix bug in JSON reading that wasn't advancing JSON parser past the value of "links" on incoming JSON, causing the entity properties to not be read correctly which prevents the update from succeeding correctly. --- .../rest/webmvc/json/RepositoryAwareJacksonModule.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/RepositoryAwareJacksonModule.java b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/RepositoryAwareJacksonModule.java index 58a2af433..f2b92cdf2 100644 --- a/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/RepositoryAwareJacksonModule.java +++ b/spring-data-rest-webmvc/src/main/java/org/springframework/data/rest/webmvc/json/RepositoryAwareJacksonModule.java @@ -259,6 +259,13 @@ public class RepositoryAwareJacksonModule extends SimpleModule implements Initia continue; } + if("links".equals(name)) { + while((tok = jp.nextToken()) != JsonToken.END_ARRAY) { + // Advance past the links + } + continue; + } + if(null == attrMeta) { // do nothing continue;