[API] fix JSON serialization of py3 dict_values