Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to represent an empty field in yaml

I am working with fixtures on rails and I want one of the fixture fields to be blank.

Example:

two:
name: test
path: - I want this blank but not to act as a group heading.
test: 4

But, I do not know how to leave path: blank without it acting as a group title. Does anybody know how to do that?

like image 767
Josh Moore Avatar asked Sep 11 '08 08:09

Josh Moore


2 Answers

YAML files are based on indentation. Once you actually have correct indentation it will read everything at the same level as siblings.


two:
  name: test
  path: 
  test: 4
like image 136
Tom Avatar answered Sep 18 '22 02:09

Tom


Google says the following should work:

path: \"\"
like image 37
Paul Wicks Avatar answered Sep 18 '22 02:09

Paul Wicks