Add smart_text around input.

As the JSON serialiser barfs on bytes in Python 3, we need to add smart_text to
the input to loads.