Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

Looking for the documentation on the newest versions of SIL Engine and the Simple Issue Language for Jira 8 for Server/Data CenterClick here and leave these dusty old pages behind !

Info
titleAvailability

This routine is available starting with SIL Engine™ 4.1.0

Syntax

toJson(<any struct, array or primitive type> [, convertEmptyFields, writeNull])

...

Parameter

Type

Required

Description

<any struct, array or primitive type>

variable: primitive type, array or struct

Yes

The variable to be converted to JSON

convertEmptyFieldsbooleanNoFlag that indicates if empty fields should be converted (if missing or true) or excepted
writeNullbooleanNo

If true: an empty field will have a null value, for example: "emptyField": null

If false: an empty field will have empty string value, for example: "emptyField": ""

Note: the behavior described above applies only for the convertEmptyFields flag set to true.

Return type

string

Example

You can look at this routine as the preparatory one for the integration with other systems. You build your data structure first and then convert your struct to json to be sent to an external system. 

...