add support for serialization

more readme and examples
fix inspect in Ruby2.0