LogStash with distributor pattern, relay pipelines problem

Ok just edited, using :

- pipeline.id: udp
  config.string: |
    input { udp { port => 514 codec => "json" } }

works fine for json input. I see the data on elastic in the right index.

But unfortunately on that port i have other inputs that aren't always formatted in json.

I need something like:

input { pipeline { address => localadmin codec => "json"} }

Maybe using the json codec directly in the filter section of th pipeline?

Thankyou.