use subtype to disallow encoding invalid values

encode related function should only accept tags that are actually
encodable rather than raising on an invalid json tag.
gitignore
Merge pull request #6 from rgrinberg/master

Yo dawg, i heard you liked types...