Questions tagged [pretty-print]

The process of pretty-printing involves applying different stylistic formatting conventions to various types of content such as text, source code, and markup. These conventions typically include adjustments in positioning, spacing, color, contrast, size, and other modifications aimed at enhancing the readability and visual appeal of the content for better understanding by users.

What is the best way to style (enhance readability) a multi-dimensional array for debugging purposes?

Does anyone know of a code pretty print tool online that can format multi-dimensional arrays for easy viewing? For example, how can we transform the following: array(83) { [0]=> array(2) { ["name"]=> string(11) "CE2 Options" ["type"]=> string(5) "t ...

Displaying a date and time beautifully in jQuery/JavaScript by providing the day of the week along with the specific time

Does anyone know of a Javascript library, preferably a jQuery plugin, that can take datetimes in any standard format (such as ISO 8601) and convert them into user-friendly strings like: Wednesday, 5:00pm Tomorrow, 9:00am Saturday, 11:00pm I'm not c ...

Is there a way to turn off tsc pretty printing using the configuration file?

My typescript program is intentionally broken but I want to fix it. 12:17:23:~/hello $ cat hello.ts console.log("Hello World" 12:17:29:~/hello $ cat package.json { "dependencies": { "typescript": "^5.2.2" ...

How can jq be used to compactly format specific fields?

Is jq the optimal solution for formatting arbitrary JSON? cat my.json | jq . is effective for pretty-printing JSON, but it can expand each field on separate lines. However, what if certain fields are repetitive, like a list of points? How can we format m ...

Analyzing JSON data and displaying the information on the console

I received a JSON with the structure shown below - { "gridDefinition": {}, "zoneDefinitions": [ { "status": "Pending", "name": "xxx-1", "globalName": "xxx-2", "id": 10, "memory": ...

Improving the Appearance of JSON Data on Android: Step-by-Step Guide

My Android application displays raw JSON data from an API, but I want to format it in a pretty print style like this: https://i.stack.imgur.com/hJSe3.png Instead of the current display which looks like this: https://i.stack.imgur.com/kLH9l.png Here is ...