From 762acdf13b63b17d9cf61c969edd74d054b2b1fe Mon Sep 17 00:00:00 2001 From: buom <39004+buom@users.noreply.github.com> Date: Thu, 9 Mar 2023 00:06:08 +0700 Subject: [PATCH] Update api.md correct the default filter --- docs/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index b4cd003..14a90f6 100644 --- a/docs/api.md +++ b/docs/api.md @@ -17,7 +17,7 @@ You can set the filter like this: ``` Expression e = new Parser(reader) .withObjectFilter(filter) - .parse(); + .compile(); ``` The filter can be either a string containing JSLT. The JSLT expression @@ -25,7 +25,7 @@ needs to return `true` for the object values that should be included. So to get the default behaviour you would set the filter to: ``` -. == null or . == {} or . == [] +. == null or . == {} or . == [] or not(.) == false ``` If you simply want no object keys to ever be omitted, set it to: