README.md
1json-yaml
2=========
3**json-yaml** [_file_]
4
5**yaml-json** [_file_]
6
7Convert JSON to YAML or back. Uses standard input if no filename is supplied.
8
9Examples
10--------
11`$ json-yaml sample.json`
12
13 firstName: John
14 lastName: Smith
15 isAlive: true
16 age: 25
17 address:
18 streetAddress: 21 2nd Street
19 city: New York
20 state: NY
21 postalCode: 10021-3100
22 phoneNumbers:
23 - type: home
24 number: 212 555-1234
25 [...]
26
27`$ yaml-json sample.yaml`
28
29 {
30 "firstName": "John",
31 "lastName": "Smith",
32 "isAlive": true,
33 "age": 25,
34 "address": {
35 "streetAddress": "21 2nd Street",
36 "city": "New York",
37 "state": "NY",
38 "postalCode": "10021-3100"
39 },
40 "phoneNumbers": [
41 {
42 "type": "home",
43 "number": "212 555-1234"
44 },
45 [...]
46
47`$ curl -s http://api.icndb.com/jokes/random | json-yaml`
48
49 type: success
50 value:
51 id: 415
52 joke: When Chuck Norris wants an egg, he cracks open a chicken.
53 categories: []
54
55Installation
56------------
57Dependencies:
58
59 * [libyaml](http://pyyaml.org/wiki/LibYAML)
60 * [yajl](https://lloyd.github.io/yajl/)
61
62From souce, after tweaking the Makefile to taste:
63
64 make
65 make check
66 make install [DESTDIR=] [PREFIX=/usr/local]
67
68To uninstall:
69
70 make uninstall [DESTDIR=] [PREFIX=/usr/local]
71
72Authors
73-------
74Sijmen Mulder (<ik@sjmulder.nl>)
75