repair missing json encoding