change json structure and char encoding