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

Why did you add this line, rather than just relying on `json.dumps` to do the right thing?