Correct return type error in the build JSON list function from char* to json_t