toJsonObject(){
        let json = new Object();
        for(let i in this){
            if(i=='type'){
                json[i] = OS_NAME[this[i]];
            }
            else if(i=='bridge'){
                json[i] = DEV_NAME[this[i]];
            }
            else{
                json[i] = this[i];
            }                       
        }
        return json;
    }
/**
     * To serialize the Device to JSON string
     * @returns {String} JSON-serialized object
     * @function 
     */
To serialize the Device to JSON string
@returns {String} JSON-serialized object
@function
To serialize the Device to JSON string @returns { String } JSON - serialized object @function
toJsonObject(){
        let json = new Object();
        for(let i in this){
            if(i=='type'){
                json[i] = OS_NAME[this[i]];
            }
            else if(i=='bridge'){
                json[i] = DEV_NAME[this[i]];
            }
            else{
                json[i] = this[i];
            }                       
        }
        return json;
    }
toJsonObject ( ) { let json = new Object ( ) ; for ( let i in this ) { if ( i == 'type' ) { json [ i ] = OS_NAME [ this [ i ] ] ; } else if ( i == 'bridge' ) { json [ i ] = DEV_NAME [ this [ i ] ] ; } else { json [ i ] = this [ i ] ; } } return json ; }
To serialize the Device to JSON string
 @returns {String} JSON-serialized object
 @function
To serialize the Device to JSON string @returns { String } JSON - serialized object @function