-
-
Notifications
You must be signed in to change notification settings - Fork 817
Closed
Milestone
Description
class Entity {
Pojo[] pojos;
}
class Pojo {
String id;
String name;
}
public static void main(String[] args) {
// ...
JsonGeneratorDelegate delegate = new FilteringGeneratorDelegate(
generator,
new JsonPointerBasedFilter(JsonPointer.compile("/pojos/0/name")),
TokenFilter.Inclusion.INCLUDE_NON_NULL,
true);
// ...
}
But error occur if TokenFilter#filterStartArray not returning the very TokenFilter.INCLUDE_ALL.
Current context not Array but Object (through reference chain: xxx.xxx.Xxxx["xx"])
I note that FilteringGeneratorDelegate#writeStartArray(Object, int) does not invoke delegate.writeStartArray(forValue, size) when returning JsonGeneratorDelegate itself.
Am i misunderstanding the usage of TokenFilter? And how can i filter properties like this?
Sincerely looking forward to your reply.
Metadata
Metadata
Assignees
Labels
No labels