Browse Source

Use configuration instead of relying on the default.

Required for .getSubModel when using a custom provider.
pull/36/head
tok 11 years ago
parent
commit
15d42704c6
  1. 2
      json-path/src/main/java/com/jayway/jsonpath/JsonModel.java

2
json-path/src/main/java/com/jayway/jsonpath/JsonModel.java

@ -356,7 +356,7 @@ public class JsonModel {
isTrue(jsonPath.isPathDefinite(), "You can only get subModels with a definite path. Use getDetachedModel if path is not definite.");
Object subModel = jsonPath.read(jsonObject);
Object subModel = jsonPath.read(jsonObject, configuration);
if (!configuration.getProvider().isContainer(subModel)) {
throw new InvalidModelException("The path " + jsonPath.getPath() + " returned an invalid model " + (subModel != null ? subModel.getClass() : "null"));

Loading…
Cancel
Save