store: Let JSON serializers support (object) filters.

Only objects covered by the specified filter will be included in the JSON
output.