View this page in the latest version of Appian. a!toJson_26r9 Function Share Share via LinkedIn Reddit Email Copy Link Print On This Page This page contains information related to an old version of the a!toJson() Function. To take advantage of the latest features and improvements, we always recommend you use the latest version whenever possible. See the latest version's page for information about what's been changed. Function a!toJson_26r9( value, removeNullOrEmptyFields ) Converts a value into a JSON string. Parameters Keyword Type Description value Any Type The value to convert into a JSON string. removeNullOrEmptyFields Boolean Determines whether fields with values that are null, empty strings, or empty arrays are removed from the JSON output. Default: false. Returns Text Usage considerations Using the value parameter The value parameter must be a CDT, a dictionary, a map, a record, or a list. Using the removeNullOrEmptyFields parameter The removeNullOrEmptyFields parameter removes all fields with values that are null, empty strings, or empty arrays from the generated JSON request body. This is important for certain web services, such as those that follow the OData protocol. Some web services treat fields with null values differently from fields that aren't included in the request body at all. Omitting a field may mean "don't modify the field," while sending a null value for that field would mean "write a null value to the field." The behavior of removeNullOrEmptyFields can also be leveraged for integrations that send a JSON request body by selecting the checkbox labeled Remove fields with null or empty values from generated JSON. Feature compatibility The table below lists this function's compatibility with various features in Appian. Feature Compatibility Note Portals Incompatible Offline Interfaces Incompatible Sync-Time Custom Record Fields Incompatible Real-Time Custom Record Fields Incompatible Custom record fields that evaluate in real time must be configured using one or more Custom Field functions. Process Reports Incompatible Cannot be used to configure a process report. Process Events Partially compatible If autoscale is enabled, can be used to configure a supported process event node (such as a start event or timer event). Process Autoscaling Compatible Can be used in autoscaled processes. Event Consumer Filter Conditions Incompatible Cannot be used in filter conditions. Event Consumer Event Handlers Compatible Can be used in event handler expressions. Feedback Was this page helpful? SHARE FEEDBACK Loading...