@Override public boolean apply(JSONSerializer serializer, Object source, String name) { if (source == null) { return true; } // if context path is "$.bar.zee" or "$[0].bar.zee" and name is "foo" // then path should be "bar.zee.foo" String path; FastStr fs = FastStr.of(serializer.getContext().toString()).append('.').append(name); path = fs.substring(fs.indexOf('.') + 1); // skip the first "." return matches(path); }
@Override public boolean apply(JSONSerializer serializer, Object source, String name) { if (source == null) { return true; } // if context path is "$.bar.zee" or "$[0].bar.zee" and name is "foo" // then path should be "bar.zee.foo" String path; FastStr fs = FastStr.of(serializer.getContext().toString()).append('.').append(name); path = fs.substring(fs.indexOf('.') + 1); // skip the first "." return matches(path); }