Skip to content

Developer Features: Server script: $p.JSON.stringify(deprecated)

Overview

In "Server Script", serialize objects that can be used in server scripts, such as model, and objects returned from the server into strings.

Syntax

$p.JSON.stringify(value)

Parameter

Parameter Type Required Description
value object Server script object

Usage Example

In the following example, the body of the model object is serialized and output to the console.

JavaScript
context.Log($p.JSON.stringify(model));
Example Output
{"ReadOnly":false,"SiteId":73152,"Title":"Building a network","Body":"Building a network.\r\n ・VLAN Settings\r\n ・Switch Settings","Ver":3,"Creator":29867,"Updator":29867,"CreatedTime":"2024-01-20T16:56:00","UpdatedTime":"2024-02-05T13:02:00","ClassA":"Build","ClassB":"Create[Fixed Form]","ClassC":"Network Security","CheckA":false,"AttachmentsA":"[]","Comments":"[]","IssueId":73209,"StartTime":"2024-02-02T00:00:00","CompletionTime":"2024-02-05T00:00:00","WorkValue":12.0000,"ProgressRate":85.0,"RemainingWorkValue":1.8000000,"Status":100,"Manager":29867,"Owner":29867,"Locked":false}