Skip to content

Commit

Permalink
fixed MappingContext creation from JSON
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
  • Loading branch information
thjaeckle committed Mar 1, 2018
1 parent 4405f06 commit c7cca93
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -83,7 +83,10 @@ public static MappingContext fromJson(final JsonObject jsonObject) {
final String contentType = jsonObject.getValueOrThrow(JsonFields.CONTENT_TYPE);
final String mappingEngine = jsonObject.getValueOrThrow(JsonFields.MAPPING_ENGINE);
final Map<String, String> options = jsonObject.getValueOrThrow(JsonFields.OPTIONS).stream()
.collect(Collectors.toMap(e -> e.getKey().toString(), e -> e.getValue().toString()));
.collect(Collectors.toMap(
e -> e.getKey().toString(),
e -> e.getValue().isString() ? e.getValue().asString() : e.getValue().toString())
);

return of(contentType, mappingEngine, options);
}
Expand Down

0 comments on commit c7cca93

Please sign in to comment.