JustBash.Commands.Jq.Evaluator.Format (JustBash v0.4.0)

View Source

Output formatting functions for jq.

Handles conversion of jq values to various output formats: CSV, TSV, JSON, text, base64, URI encoding, and HTML escaping.

Summary

Functions

Format data according to the specified format type.

Convert a value to its string representation for jq output.

Functions

format(name, data)

@spec format(atom(), any()) :: String.t()

Format data according to the specified format type.

Format Types

  • :csv - Comma-separated values
  • :tsv - Tab-separated values
  • :json - JSON encoding
  • :text - Plain text
  • :base64 - Base64 encoding
  • :base64d - Base64 decoding
  • :uri - URI encoding
  • :html - HTML entity escaping

stringify(s)

@spec stringify(any()) :: String.t()

Convert a value to its string representation for jq output.