Adding field to_string/from_string methods that encode to JSON/YAML strings.

I understand the desire for this indenting, but it worries me a little bit, both from the perspective of correctness (what if amount of leading whitespace is semantically meaningful), and implementation (all of these inline function definitions are going to lead to extra work, and make the code harder to read).