Skip to content

Write JSON

Type: write-json  ·  Package: JSON Activities v1.0.0  ·  Output: string

Converts a value (a dictionary, a list, an object) to JSON and saves it to a file. Useful for generating configuration files, exporting data or preparing the body of a request.

Serializes value to JSON and writes it to path. By default it formats the result in a readable form (indented = true). Returns the written path.

ParameterEditorDescription
pathexpressionPath of the output JSON file.
valueexpressionThe value to convert (dictionary, list, object).
ParameterEditorDescription
indentedbooleanFormatear de forma legible. Por defecto true.

Returns a string with the file path written.

Create Dictionary outputVariable = resultado
Set Dictionary Value dict = = resultado key = "procesados" value = = total
Set Dictionary Value dict = = resultado key = "fecha" value = = today().ToString("yyyy-MM-dd")
Write JSON path = "C:/salida/resumen.json" value = = resultado