optimisation serialize => json_encode