encode solution to ch3 in json