You can use a codec in almost every input, but just one, in the input you shared you are already using a json codec, so you cannot use the multiline codec.
Also, if your messages are in json format it does not make much sense to use the multiline codec you shared, it would never match.
It would help if you shared a sample of your messages and what you are trying to achieve.