Add filterSet.toJSON method (used only for logging).