Empty field in yaml

maidi picture maidi · Dec 4, 2015 · Viewed 63.1k times · Source

I want to leave a value in my .yaml field empty, because in another translation there has to be something but not in this one. Just leaving it empty prints out the path of the value (...title.3).

title:
    1: String
    2: String2
    3:

Answer

Robert picture Robert · Dec 4, 2015

You can use ~ or null.

You should read documentation of YAML and you can read Symfony Yaml Format as well

title:
    1: String
    2: String2
    3: ~