hook before json_encode. We can change data in this hook