Ruby module to easily provide json serialization