Skip to content

Proposal: Add a "prettify" option to $string() #334

@jhorbulyk

Description

@jhorbulyk

If one has an object that they want to render as a string in JSONata, it is possible to produce a JSON representation of that object with the $string() function. However, this function produces a JSON output with minimal whitespaces which can be good for some situations but not good for others. It would be nice if there was a way to render "prettified" JSON (one line per field, indenting based on the field depth) to the output. Perhaps a second boolean argument to $string() called prettify might do the trick.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions