make serialize more similar to Rails, add YAML option