Skip to content

Enhancement: use jq utility for JSON stuff #20

@bcattaneo

Description

@bcattaneo

I recommend doing the following:

	jq -Mnc ".expiry = \"${expiration}\" | .files[0] = { name: \"${description}\", lexer: \"${language}\", content: \"${content}\" }"

It will add a dependency on the jq utility; however, jq can also be used in geturl to parse JSON output instead of relying on regular expressions.

Using jq also enables the removal of some of the escape functions used below.

Originally posted by @nvinson in #16 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions