safe a few CPU cycles on filter.empty?
panic on json marshalling errors