1
0
mirror of /repos/dotTiddlywiki.git synced 2025-12-30 07:31:33 +01:00
dotTiddlywiki/mywiki/tiddlers/YAML JSON.tid
Aiko Mastboom 895aed2b27 update
2016-01-02 16:40:54 +01:00

17 lines
680 B
Plaintext

created: 20151209155049733
creator: user
modified: 20151209155206329
modifier: user
tags:
title: YAML JSON
type: text/vnd.tiddlywiki
; Note that you'll need to have ~PyYaml installed.
: http://stackoverflow.com/questions/14261614/how-do-i-install-the-yaml-package-for-python
; http://www.commandlinefu.com/commands/view/12218/convert-yaml-to-json
: `python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=2)' < file.yaml > file.json`
; http://www.commandlinefu.com/commands/view/12219/convert-json-to-yaml
: `python -c 'import sys, yaml, json; yaml.safe_dump(json.load(sys.stdin), sys.stdout, default_flow_style=False)' < file.json > file.yaml`