A simple Ruby script that can convert between different formats (msgpack / json / yaml / toml).
Marek Küthe c20055163f Fix bug when opening msgpack files | преди 11 месеца | |
---|---|---|
bin | преди 11 месеца | |
.gitignore | преди 11 месеца | |
LICENSE | преди 11 месеца | |
README.md | преди 11 месеца | |
convert-serialization.gemspec | преди 11 месеца |
A simple Ruby script that can convert between different formats (msgpack / json / yaml / toml).
$ cat test.json
{"hello":"world","numbers":[1,2,3,4,5]}
$ convert-serialization -s json -d toml -i test.json -o test.toml
Conversion successful!
$ cat test.toml
hello = "world"
numbers = [ 1, 2, 3, 4, 5 ]
$ convert-serialization -s toml -d msgpack -i test.toml -o test.msgpack
Conversion successful!
$ hexdump -C test.msgpack
00000000 82 a5 68 65 6c 6c 6f a5 77 6f 72 6c 64 a7 6e 75 |..hello.world.nu|
00000010 6d 62 65 72 73 95 01 02 03 04 05 |mbers......|
0000001b