Improved type safety and performance in JsonProvider.