use type restriction (ToJSON v, FromJSON v) to shorten code
Merge branch 'refactor-readyaml'