7952b18d29a4d497f921e3e2345c50717e3a61ec
[platform/framework/web/crosswalk-tizen.git] /
1 'use strict';
2
3
4 var yaml = require('../lib/js-yaml');
5 var object = require('./dumper.json');
6
7
8 console.log(yaml.dump(object, {
9   flowLevel: 3,
10   styles: {
11     '!!int'  : 'hexadecimal',
12     '!!null' : 'camelcase'
13   }
14 }));
15
16
17 // Output:
18 //==============================================================================
19 // name: Wizzard
20 // level: 0x11
21 // sanity: Null
22 // inventory:
23 //   - name: Hat
24 //     features: [magic, pointed]
25 //     traits: {}
26 //   - name: Staff
27 //     features: []
28 //     traits: {damage: 0xA}
29 //   - name: Cloak
30 //     features: [old]
31 //     traits: {defence: 0x0, comfort: 0x3}