Skip to content

Releases: yakubique/jsonify-array

Release list

v1.1

Choose a tag to compare

@opa-oz opa-oz released this 16 Mar 07:26

JSONify array

Full Changelog: v1...v1.1
Replace field in JSON with its JSON.stringify() version

Test jsonify-array action

Usage workflow

Usage

- name: JSONify array
  uses: yakubique/jsonify-array@v1
  with:
    input: |
      [ { "obj": {"id": 1 } } ]
    type: "nested-json"
    key: "obj"

# [ { "obj": "{\"id\":1}" } ]

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
input string true JSON to modify
type string false "flat-json" Type of input data ["flat-json", "nested-json"] (default: "flat-json")
key string false If type="nested-json" - which key should
be used
from_file string false "false" Load json from file
to_file string false "false" Save result to file

Outputs

OUTPUT TYPE DESCRIPTION
result string Filepath or JSON

ko-fi

v1

Choose a tag to compare

@opa-oz opa-oz released this 28 Feb 11:45

JSONify array

Replace field in JSON with its JSON.stringify() version
Full Changelog: https://github.com/yakubique/jsonify-array/commits/v1

Test jsonify-array action

Usage workflow

Usage

- name: JSONify array
  uses: yakubique/jsonify-array@v1
  with:
    input: |
      [ { "obj": {"id": 1 } } ]
    type: "nested-json"
    key: "obj"

# [ { "obj": "{\"id\":1}" } ]

Inputs

INPUT TYPE REQUIRED DEFAULT DESCRIPTION
input string true JSON to modify
type string false "flat-json" Type of input data ["flat-json", "nested-json"] (default: "flat-json")
key string false If type="nested-json" - which key should
be used
from_file string false "false" Load json from file
to_file string false "false" Save result to file

Outputs

OUTPUT TYPE DESCRIPTION
result string Filepath or JSON

ko-fi