change sending char* to send JSON object and optimize something
use jsoncpp and optimize something