rename toJSON and toYAML to printJSON and printYAML respectively to avoid collision with typeclasses