Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

NotifyAction - fromJson(String json)

Log in to subscribe to topics and get notified when content changes.

NotifyAction - fromJson(String json)

Deserialize a NotifyAction object from a JSON string.

Table 1. Parameters
Name Type Description
json String A JSON string representation of a NotifyAction object.
Table 2. Returns
Type Description

This example demonstrates deserializing a NotifyAction object.

var json = ".... some json obtained from toJson ....";

// instantiate notify action
var notifyAction = new SNC.NotifyAction();

// deserialize and reconstruct the notify action instance

This example demonstrates both serializing and deserializing a NotifyAction object.

// instantiate notify action
var notifyAction = new SNC.NotifyAction();

// add a queue
var queue = notifyAction.addQueue();

// serialize to json
var json = notifyAction.toJson();
gs.log('serialization result: ' + json);

// instantiate a new notify action
var newAction = new SNC.NotifyAction();

// deserialize the json generated above

// serialize the new object and log the result
newJson = newAction.toJson();
gs.log('new serialization result: ' + newJson);
gs.log('the same: ' + (json == newJson));

Output: *** Script: serialization result: {"fClassName":"NotifyAction","fActions":[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}]} *** Script: new serialization result: {"fClassName":"NotifyAction","fActions":[{"fClassName":"QueueAction","fDequeue":true,"fQueueName":"myQueueName"}]} *** Script: the same: true