Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple level nesting in YAML

Tags:

I'm trying to use YAML to create list of all stored procs used in an application and from where they are called. I envisioned something like below but I think YAML does not allow multiple level nesting.

access_log:   stored_proc: getsomething     uses:       usedin: some->bread->crumb       usedin: something else here   stored_proc: anothersp     uses:       usedin: blahblah  reporting:   stored_proc: reportingsp     uses:       usedin: breadcrumb 

Is there a way to do this in YAML and if not, what other alternatives are there?

like image 264
Anthony Avatar asked Jan 18 '12 15:01

Anthony


1 Answers

That's exactly how I've used nested levels in YAML for configuration files for perl scripts. This YAML Tutorial might be a good reference for you on how to handle the structure you want in Ruby.

I think your problem is trying to mix types. I suggest revising like this:

reporting:    stored_procs:      -        name: reportingsp       uses:          usedin: breadcrumb     -        name: secondProc       uses:          usedin: something_else 
like image 87
Ilion Avatar answered Nov 29 '22 09:11

Ilion