Browse Source

Fixed issue with 'DEFAULT_PATH_LEAF_TO_NULL' and multiple properties.

pull/56/head
Kalle Stenflo 10 years ago
parent
commit
215a5e237f
  1. 4
      json-path/src/main/java/com/jayway/jsonpath/internal/token/PathToken.java

4
json-path/src/main/java/com/jayway/jsonpath/internal/token/PathToken.java

@ -63,6 +63,10 @@ public abstract class PathToken {
} }
} }
ctx.addResult(evalPath, propertyVal); ctx.addResult(evalPath, propertyVal);
} else {
if(ctx.options().contains(Option.DEFAULT_PATH_LEAF_TO_NULL)){
ctx.addResult(evalPath, null);
}
} }
} }
} }

Loading…
Cancel
Save