A simple Ruby script that can convert between different formats (msgpack / json / yaml / toml).

Marek Küthe c20055163f Fix bug when opening msgpack files 4 months ago
bin c20055163f Fix bug when opening msgpack files 4 months ago
.gitignore 8f6986e146 Initial commit 4 months ago
LICENSE 8f6986e146 Initial commit 4 months ago
README.md da3abde184 Initial commit 4 months ago
convert-serialization.gemspec c20055163f Fix bug when opening msgpack files 4 months ago

README.md

convert-serialization

A simple Ruby script that can convert between different formats (msgpack / json / yaml / toml).

Usage

$ 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