It works now. The JSON shouldn't contain the feild name id and use \" to separate each field value.
so the JSON format would look like this :
"{\"version\":0,\"name\":\"<db_name>\",\"nameUnique\":true,\"builtIn\":false,\"createdBy\":\"admin\",\"createdOn\":1477638562524,\"modifiedBy\":\"admin\",\"modifiedOn\":1477638562524,\"type\":\"MONGO\",\"hostname\":\"<db_host>\",\"useWindowsAuth\":false,\"username\":\"<user>\",\"password\":\"<password>\",\"port\":<port>,\"loggingEnabled\":false,\"databaseName\":null,\"failoverPartner\":null,\"connectAsSysdba\":false,\"useServiceName\":false,\"sid\":null,\"customConnectionString\":null,\"enterpriseDB\":false,\"useSSL\":false,\"enableOSMonitor\":false,\"hostOS\":null,\"useLocalWMI\":false,\"hostDomain\":null,\"hostUsername\":null,\"hostPassword\":null,\"certificateAuth\":false,\"removeLiterals\":true,\"sshPort\":0,\"agentName\":\"Default Database Agent\"}"