Recursively traverse json and trim strings in Python