dynamic json_encode() bitmask