preview json_encode correction