#699 - Render additional RFC5988 attributions in HAL.
This commit is contained in:
committed by
Greg Turnquist
parent
1e32bb5d2d
commit
ba1dae383c
@@ -82,6 +82,7 @@ import com.fasterxml.jackson.databind.type.TypeFactory;
|
||||
*
|
||||
* @author Alexander Baetz
|
||||
* @author Oliver Gierke
|
||||
* @author Jeffrey Walraven
|
||||
*/
|
||||
public class Jackson2HalModule extends SimpleModule {
|
||||
|
||||
@@ -573,11 +574,19 @@ public class Jackson2HalModule extends SimpleModule {
|
||||
if (JsonToken.START_ARRAY.equals(jp.nextToken())) {
|
||||
while (!JsonToken.END_ARRAY.equals(jp.nextToken())) {
|
||||
link = jp.readValueAs(Link.class);
|
||||
result.add(new Link(link.getHref(), relation));
|
||||
result.add(new Link(link.getHref(), relation)
|
||||
.withHreflang(link.getHreflang())
|
||||
.withTitle(link.getTitle())
|
||||
.withType(link.getType())
|
||||
.withDeprecation(link.getDeprecation()));
|
||||
}
|
||||
} else {
|
||||
link = jp.readValueAs(Link.class);
|
||||
result.add(new Link(link.getHref(), relation));
|
||||
result.add(new Link(link.getHref(), relation)
|
||||
.withHreflang(link.getHreflang())
|
||||
.withTitle(link.getTitle())
|
||||
.withType(link.getType())
|
||||
.withDeprecation(link.getDeprecation()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user