SShortSingh.
Back to feed

jq, json.tool, or Browser Formatter: A Practical Guide to Pretty-Printing curl JSON

0
·2 views

Developers routinely deal with minified JSON responses from curl commands and typically rely on one of three formatting tools depending on the situation. jq is the fastest and most capable option, supporting filtering and precise error reporting, but may not be available in minimal container or CI environments. Python's built-in json.tool serves as a reliable fallback where jq cannot be installed, though it lacks filtering capabilities. Browser-based formatters are useful when sharing output with teammates, but a security disclosure revealed that popular online formatters had retained over 80,000 snippets containing sensitive credentials like AWS keys and JWTs. Regardless of the tool used, stripping sensitive fields such as tokens, passwords, and internal IDs with jq's del() function before sharing any payload is a recommended but often overlooked step.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developers Share Universal Phrases Said When Code Mysteriously Breaks

A lighthearted collection of common exclamations made by software developers when their code fails to work as expected has been compiled on DEV Community. The list includes familiar phrases such as 'it works on my machine,' 'I haven't changed anything,' and 'all the tests pass.' These statements are reportedly uttered by both junior and senior developers worldwide. The author notes the expressions are a shared, relatable experience across the software development profession. Readers are invited to contribute their own encountered phrases in the comments section.

0
ProgrammingDEV Community ·

Downbeat lets parallel AI coding sessions exchange messages without manual copy-pasting

A developer has released Downbeat, a lightweight open-source tool that allows multiple AI coding sessions running on the same machine to pass messages directly to one another. The tool was built to solve the problem of manually shuttling context, tasks, and results between parallel Claude Code terminals via clipboard. Downbeat works entirely offline using a filesystem-backed message queue, with no cloud service, account, or network connection required. Each session registers as a named peer, and messages appear automatically at the start of a recipient session's next turn through a hook system. The tool is available on PyPI and can be installed with a single command: 'uv tool install downbeat'.

0
ProgrammingDEV Community ·

Microsoft D365 Customer Insights Used Internally to Build Sales Alert Segments

A team using Microsoft Dynamics 365 Customer Insights - Data as their own internal sales tool has moved into the segment-building phase after completing data unification. Three key segments were created: customers with licenses expiring soon, customers with no active opportunity but a past won deal, and customers with no recent contact activity. Segments are built using relative date conditions tied to fields such as renewal date and last activity date, rather than fixed calendar dates. Each segment rule must be validated by checking its member count, as a zero result signals an issue with the underlying data source or unification settings. In the team's case, the first rule returned eight matching records, confirming the data pipeline was functioning correctly.

0
ProgrammingDEV Community ·

Developer Builds Slack AI Assistant Using Tool Chaining and Session Memory

A developer has built a Slack-based AI assistant as a personal project using an AI agent framework called Open Claw, which enables multiple tools to be combined and executed via natural language commands. The assistant supports four core functions: answering capability queries, converting DOCX files to PDF, summarizing document contents, and checking whether URLs or Excel-linked endpoints are active. A key design feature is that the LLM dynamically selects and sequences tools based on user intent, meaning the order of instructions in a command affects the output. The system also incorporates session memory by persisting processed Slack message timestamps to disk, allowing the agent to resume correctly after restarts without reprocessing old messages. The developer noted that blending algorithmic programming with LLM capabilities — rather than relying solely on the model — improved overall accuracy and reliability.