I'm trying to create a function that enters a key/value into a JSON file. But, since value can be an `int` or `char`, I don't want to create 2 functions for each type. Is there a way ? void setValue(char *key, char* value){ StaticJsonDocument<512> tempJDOC; tempJDOC[key]=value; } **EDIT1** #ifndef myJSON_h #define myJSON_h #include "Arduino.h" #include <ArduinoJson.h> #include "FS.h" class myJSON { private: bool _useSerial=false; char _filename[30]; public: char *ver="myJSON_v1.1"; myJSON(char *filename, bool useserial=false); bool file_exists(); bool file_remove(); bool format (); bool FS_ok(); void saveJSON2file(JsonDocument& _doc); void readJSON_file(JsonDocument& _doc); void printJSON(JsonDocument& _doc); void PrettyprintJSON(JsonDocument& _doc); const char *getValue (char *key); template <class T> void setValue(const char *key, T value); //void setValue(const char *key, char *value); }; #endif