Embedding JSON Data into YAML file

后端 未结 5 2000
孤城傲影
孤城傲影 2020-12-13 16:52

I am writing a fixture for my table. And a one of the coloums takes in a JSON string as a value.

The problem is the fixture is not loading failing as:



        
5条回答
  •  臣服心动
    2020-12-13 17:43

    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...
    

提交回复
热议问题