Yaml format with question marks and |

I have a strange yaml format with question marks and "|"

. I converted the tsv to yml file with ruby ​​code ... What could be wrong in my code to get me to have this?

- date: 9/12/2014 20:20:55
  student_id: '1634'
  languages: 'Java, C , HTML , JavaScript , '
  best_language: Java
  app_experience: Native GUI applications, Web Applications, Mobile Applications, Database Driven Applications
  ? |
    tech_experience
  : |
    Unix-based OS, Database, Regular Expressions, Web Design

      

+3


source to share


2 answers


I solved the problem ... the part where there is "|" and question marks had some line breaks inside (\ n). I used "require p" to check that ... So I had to grind the strings and everything went well.



0


source


As stated in the YAML link



A question mark and a space ("?") Indicate a complex mapping key. Within a collection of blocks, key: value pairs can begin immediately following a dash, colon, or question mark.

...

The content of a node mapping is an unordered set of key: node value pairs, with the constraint that each of the keys is unique. YAML does not impose any restrictions on nodes. In particular, keys can be arbitrary nodes, the same node can be used as the value of multiple key: value pairs, and the map can even contain itself as a key or value (directly or indirectly).

+4


source







All Articles