Fix JSON API for JSON subtypes

See https://github.com/share/ottypes/pull/9