Solution 1:

I believe taking it into quotes should do the trick:

portslist: '[{"name":"ob1","port_type" ... }]'

Solution 2:

clarkevans' comment on the accepted answer suggested a better answer for long bits of JSON, because you can wrap the lines. I looked up the block scalar syntax he mentioned, and thought I would include an example here:

portslist: >
  [{"name":"ob1","port_num":0,"port_type":"network"},
  {"name":"ob2","port_nu...