:+1: json_encode should be done only once