• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.gitignoreH A D31-Dec-201920 32

.travis.ymlH A D31-Dec-2019334 1512

CHANGES.mdH A D31-Dec-20191.6 KiB4942

LICENSE.mdH A D31-Dec-20191.3 KiB2419

MakefileH A D31-Dec-2019745 3022

README.mdH A D31-Dec-20191.4 KiB7559

json-yaml.1H A D31-Dec-2019442 2625

json-yaml.cH A D31-Dec-20195.4 KiB292221

sample.jsonH A D31-Dec-2019479 3129

sample.yamlH A D31-Dec-2019300 1918

yaml-json.1H A D31-Dec-2019390 2423

yaml-json.cH A D31-Dec-20193.6 KiB190155

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