new SshCommand(command [, data])
Constructor.
Parameters:
| Name | Type | Argument | Description | 
|---|---|---|---|
command | 
            
            string | the command  | 
        |
data | 
            
            * | 
                
                    <optional> | 
            
            
            optional data to associate with the command  | 
        
Methods
- 
    
<static> fromJsonEncoding(json [, dataParser])
 - 
    
    
Parse a JSON string into a
module:domain~SshCommandinstance.The JSON must be encoded the same way
module:domain~SshCommand#toJsonEncodingdoes.Parameters:
Name Type Argument Description jsonstring the JSON to parse
dataParserfunction <optional> 
if provided, a function that accepts a string of JSON and returns an object representation of that data; if not provided then a simple object parsed via
JSON.parse()will be usedReturns:
the command instance
- Type
 - module:domain~SshCommand
 
 - 
    
toJsonEncoding()
 - 
    
    
Get this object as a standard JSON encoded string value.
If
datahas atoJsonEncoding()function, that will be invoked and used in the result. Otherwise thedataobject will be serialized to JSON viaJSON.stringify().Returns:
the JSON encoded string
- Type
 - string