Elektra  0.8.25
Plugin: yambi

YAMBi

Introduction

This plugin uses Bison to generate a parser for the YAML serialization format.

Dependencies

The plugin requires Bison (3.0 or later).

Examples

Mappings

# Mount plugin
sudo kdb mount config.yaml user/tests/yambi yambi
kdb set user/tests/yambi 'Mount Point'
kdb get user/tests/yambi
#> Mount Point
kdb set user/tests/yambi/bambi 'Mule Deer'
kdb get user/tests/yambi/bambi
#> Mule Deer
kdb set user/tests/yambi/thumper 'Rabbit'
kdb get user/tests/yambi/thumper
#> Rabbit
kdb set user/tests/yambi/bambi/baby 'Bobby Stewart'
kdb set user/tests/yambi/bambi/young 'Donnie Dunagan'
kdb set user/tests/yambi/bambi/adolescent 'Hardie Albright'
kdb set user/tests/yambi/bambi/adult 'John Sutherland'
kdb get user/tests/yambi/bambi/baby
#> Bobby Stewart
kdb ls user/tests/yambi
#> user/tests/yambi
#> user/tests/yambi/bambi
#> user/tests/yambi/bambi/adolescent
#> user/tests/yambi/bambi/adult
#> user/tests/yambi/bambi/baby
#> user/tests/yambi/bambi/young
#> user/tests/yambi/thumper
# Undo modifications
kdb rm -r user/tests/yambi
sudo kdb umount user/tests/yambi

Arrays

# Mount plugin
sudo kdb mount config.yaml user/tests/yambi yambi
kdb set user/tests/yambi/friends
kdb set user/tests/yambi/friends/#0 Thumper
kdb set user/tests/yambi/friends/#1 Flower
# Retrieve last array index
kdb getmeta user/tests/yambi/friends array
#> #1
kdb get user/tests/yambi/friends/#0
#> Thumper
kdb get user/tests/yambi/friends/#1
#> Flower
# Undo modifications
kdb rm -r user/tests/yambi
sudo kdb umount user/tests/yambi

Limitations

The plugin supports the same limited YAML syntax as Yan LR.