Ruby to_json encode cyrillic into unicode

I have a hash object with cyrilic text like this

payload = {'date': "30",'name': 'Тест','phone': "71234567890",'sum': "0",'offer_id': "1"}

I need to convert it to json and send to php api service like this


But to_json returns me


How do I encode cyrilic into unicode in that case? Do I need to pass options to to_json method?

Leave a Reply

Your email address will not be published. Required fields are marked *