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

Parameterized test - might be a good idea to rerite it using nose-parameterized, data-driven tests or something similar