SlideShare a Scribd company logo
JSON
Viewer
Dhaval Dalal
https://dhavaldalal.wordpress.com
@softwareartisan
Story #1: View Raw Content
As a developer,
I want to see all the lines of a JSON text
file as-is when I specify on command
line,
$> prettyjson -r responses.json
So that I can know its contents.
Story #2: View raw content
with Line Numbers
As a developer,
I want to see all the lines of a JSON text
file with line numbers when I specify on
command line,
$> prettyjson -l responses.json
So that I can refer to lines with line
numbers.
Story #3: Show
Pretty JSON
As a developer
I want to see the JSON text file
in a pretty format with
indentation
$> prettyjson response.json
So that I can clearly see the
keys and their corresponding
values.
[
{
"ticker": "AAPL",
"high": 60.45,
"tickMillis": {
"high": 3000,
"low": 2000
},
"low": 50.35,
"price": 53.2,
"name": "Apple Inc."
},
{
"ticker": "GOOG",
"high": 120.34,
"tickMillis": {
"high": 2000,
"low": 1000
},
"low": 90.67,
"price": 97.28,
"name": "Google Inc."
}
]
Story #4: Pretty
JSON with Line #s
As a developer
I want to see the JSON text
file in a pretty format along
with indentation and line
numbers as shown
$> prettyjson -l response.json
So that I can also refer data
using line numbers.
1 [
2 {
3 "ticker": "AAPL",
4 "high": 60.45,
5 "tickMillis": {
6 "high": 3000,
7 "low": 2000
8 },
9 "low": 50.35,
10 "price": 53.2,
11 "name": "Apple Inc."
12 },
13 {
14 "ticker": "GOOG",
15 "high": 120.34,
16 "tickMillis": {
17 "high": 2000,
18 "low": 1000
19 },
20 "low": 90.67,
21 "price": 97.28,
22 "name": "Google Inc."
23 }
24 ]
Story #5: Pygmentized JSON
As a developer
I want to see the JSON text
file in a pretty format along
with colours as shown
$> prettyjson response.json
So that I can recognise keys
are blue, numbers are in
yellow and strings are in
green colour.
NOTE: this command conflicts
with Story #3. So, we introduce
another option “nc” to produce
monochrome (not colored)
output. This will not break
Story #3.
$> prettyjson -nc response.json
Story #5:
Pygmentized JSON
[
{
"ticker": "AAPL",
"high": 60.45,
"tickMillis": {
"high": 3000,
"low": 2000
},
"low": 50.35,
"price": 53.2,
"name": "Apple Inc."
},
{
"ticker": "GOOG",
"high": 120.34,
"tickMillis": {
"high": 2000,
"low": 1000
},
"low": 90.67,
"price": 97.28,
"name": "Google Inc."
}
]
Story #6: Pygmentized JSON
with Line numbers
As a developer
I want to see the JSON text file
in a pretty format along with
lines numbers in colour and
colours as shown
$> prettyjson -l response.json
So that I can recognise keys are
blue, numbers are in yellow
and strings are in green colour.
Story #7: View Raw with all
possible options
I want to see the JSON text file in a raw format
with or without lines numbers, with to without
colours
$> prettyjson -l -r response.json
$> prettyjson -r response.json
$> prettyjson -l -r -nc response.json (same output as story#2)
Thank-you!

More Related Content

PDF
Creating Beautiful, Accessible, and User-Friendly Forms
PPTX
Data Governance with JSON Schema
PPTX
SH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptx
PPTX
SH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptx
PPTX
Validating JSON -- Percona Live 2021 presentation
PDF
Agile Database Development with JSON
PDF
MongoDB World 2019: Just-in-time Validation with JSON Schema
PDF
Json at work overview and ecosystem-v2.0
Creating Beautiful, Accessible, and User-Friendly Forms
Data Governance with JSON Schema
SH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptx
SH 1 - SES 2 part 2 - Tel Aviv MDBlocal - Eliot Keynote.pptx
Validating JSON -- Percona Live 2021 presentation
Agile Database Development with JSON
MongoDB World 2019: Just-in-time Validation with JSON Schema
Json at work overview and ecosystem-v2.0

Similar to Json Viewer Stories (20)

PDF
UKOUG Tech14 - Getting Started With JSON in the Database
PDF
Json
PPTX
How to leverage what's new in MongoDB 3.6
PPTX
Mongo db mug_2012-02-07
PPTX
Starting with JSON Path Expressions in Oracle 12.1.0.2
PPTX
Oracle Database - JSON and the In-Memory Database
PDF
Wie man Datenbankinfrastrukturen in Containern zum Laufen bringt
PPTX
How to Leverage APIs for SEO #TTTLive2019
PDF
eMan Dev Meetup: Kotlin For Android (part 03/03) 18.5.2017
PDF
M|18 Somewhere Between Schema and Schemaless
PPTX
Somewhere between schema and schemaless
PDF
"R, HTTP, and APIs, with a preview of TopicWatchr" (15 November 2011)
PDF
R, HTTP, and APIs, with a preview of TopicWatchr
PPTX
Compose Code Camp (1).pptx
PDF
JSON Support in DB2 for z/OS
DOCX
Sample-Program-file-with-output-and-index.docx
PDF
The Ring programming language version 1.5.2 book - Part 14 of 181
PPT
Advanced Json
PDF
PDF
The Ring programming language version 1.5 book - Part 3 of 31
UKOUG Tech14 - Getting Started With JSON in the Database
Json
How to leverage what's new in MongoDB 3.6
Mongo db mug_2012-02-07
Starting with JSON Path Expressions in Oracle 12.1.0.2
Oracle Database - JSON and the In-Memory Database
Wie man Datenbankinfrastrukturen in Containern zum Laufen bringt
How to Leverage APIs for SEO #TTTLive2019
eMan Dev Meetup: Kotlin For Android (part 03/03) 18.5.2017
M|18 Somewhere Between Schema and Schemaless
Somewhere between schema and schemaless
"R, HTTP, and APIs, with a preview of TopicWatchr" (15 November 2011)
R, HTTP, and APIs, with a preview of TopicWatchr
Compose Code Camp (1).pptx
JSON Support in DB2 for z/OS
Sample-Program-file-with-output-and-index.docx
The Ring programming language version 1.5.2 book - Part 14 of 181
Advanced Json
The Ring programming language version 1.5 book - Part 3 of 31
Ad

More from Dhaval Dalal (20)

PDF
Sri-Aurobindos-Integral-Education-Principles.pdf
PDF
Test Pyramid in Microservices Context
PDF
Code Retreat
PDF
Booting into functional programming
PDF
Currying and Partial Function Application (PFA)
PDF
Creating Lazy stream in CSharp
PDF
Value Objects
PDF
Mars rover-extension
PDF
How Is Homeopathy Near To Yoga?
PDF
Approaching ATDD/BDD
PDF
Paradigms Code jugalbandi
PDF
Data Reconciliation
PDF
DRYing to Monad in Java8
PDF
CodeRetreat
PDF
4-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr2015
PDF
Jumping-with-java8
PDF
3-CodeJugalbandi-currying-pfa-healthycodemagazine#mar2015
PDF
CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015
PDF
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
PDF
The tao-of-transformation-workshop
Sri-Aurobindos-Integral-Education-Principles.pdf
Test Pyramid in Microservices Context
Code Retreat
Booting into functional programming
Currying and Partial Function Application (PFA)
Creating Lazy stream in CSharp
Value Objects
Mars rover-extension
How Is Homeopathy Near To Yoga?
Approaching ATDD/BDD
Paradigms Code jugalbandi
Data Reconciliation
DRYing to Monad in Java8
CodeRetreat
4-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr2015
Jumping-with-java8
3-CodeJugalbandi-currying-pfa-healthycodemagazine#mar2015
CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
The tao-of-transformation-workshop
Ad

Recently uploaded (20)

PPTX
sap open course for s4hana steps from ECC to s4
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Cloud computing and distributed systems.
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Empathic Computing: Creating Shared Understanding
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
KodekX | Application Modernization Development
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Spectral efficient network and resource selection model in 5G networks
sap open course for s4hana steps from ECC to s4
Building Integrated photovoltaic BIPV_UPV.pdf
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Cloud computing and distributed systems.
Advanced methodologies resolving dimensionality complications for autism neur...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Empathic Computing: Creating Shared Understanding
Dropbox Q2 2025 Financial Results & Investor Presentation
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
cuic standard and advanced reporting.pdf
KodekX | Application Modernization Development
MYSQL Presentation for SQL database connectivity
Spectral efficient network and resource selection model in 5G networks

Json Viewer Stories

  • 2. Story #1: View Raw Content As a developer, I want to see all the lines of a JSON text file as-is when I specify on command line, $> prettyjson -r responses.json So that I can know its contents.
  • 3. Story #2: View raw content with Line Numbers As a developer, I want to see all the lines of a JSON text file with line numbers when I specify on command line, $> prettyjson -l responses.json So that I can refer to lines with line numbers.
  • 4. Story #3: Show Pretty JSON As a developer I want to see the JSON text file in a pretty format with indentation $> prettyjson response.json So that I can clearly see the keys and their corresponding values. [ { "ticker": "AAPL", "high": 60.45, "tickMillis": { "high": 3000, "low": 2000 }, "low": 50.35, "price": 53.2, "name": "Apple Inc." }, { "ticker": "GOOG", "high": 120.34, "tickMillis": { "high": 2000, "low": 1000 }, "low": 90.67, "price": 97.28, "name": "Google Inc." } ]
  • 5. Story #4: Pretty JSON with Line #s As a developer I want to see the JSON text file in a pretty format along with indentation and line numbers as shown $> prettyjson -l response.json So that I can also refer data using line numbers. 1 [ 2 { 3 "ticker": "AAPL", 4 "high": 60.45, 5 "tickMillis": { 6 "high": 3000, 7 "low": 2000 8 }, 9 "low": 50.35, 10 "price": 53.2, 11 "name": "Apple Inc." 12 }, 13 { 14 "ticker": "GOOG", 15 "high": 120.34, 16 "tickMillis": { 17 "high": 2000, 18 "low": 1000 19 }, 20 "low": 90.67, 21 "price": 97.28, 22 "name": "Google Inc." 23 } 24 ]
  • 6. Story #5: Pygmentized JSON As a developer I want to see the JSON text file in a pretty format along with colours as shown $> prettyjson response.json So that I can recognise keys are blue, numbers are in yellow and strings are in green colour.
  • 7. NOTE: this command conflicts with Story #3. So, we introduce another option “nc” to produce monochrome (not colored) output. This will not break Story #3. $> prettyjson -nc response.json Story #5: Pygmentized JSON [ { "ticker": "AAPL", "high": 60.45, "tickMillis": { "high": 3000, "low": 2000 }, "low": 50.35, "price": 53.2, "name": "Apple Inc." }, { "ticker": "GOOG", "high": 120.34, "tickMillis": { "high": 2000, "low": 1000 }, "low": 90.67, "price": 97.28, "name": "Google Inc." } ]
  • 8. Story #6: Pygmentized JSON with Line numbers As a developer I want to see the JSON text file in a pretty format along with lines numbers in colour and colours as shown $> prettyjson -l response.json So that I can recognise keys are blue, numbers are in yellow and strings are in green colour.
  • 9. Story #7: View Raw with all possible options I want to see the JSON text file in a raw format with or without lines numbers, with to without colours $> prettyjson -l -r response.json $> prettyjson -r response.json $> prettyjson -l -r -nc response.json (same output as story#2)