Fix JSON API for JSON subtypes

See https://github.com/share/ottypes/pull/9
Merge pull request #302 from devongovett/json-subtypes

Fix JSON API for JSON subtypes