Agras Zeta Atino

Un blog mas de tecnologia, locuras y procrastinacion

This is a post of the series: How I.
Este es un post simple en la serie “Como yo“.

The idea for now is to show JSON strings in a fashion way so that we can read complex JSON strings easier, ill show some ways, its up to you which one to use.

La idea es poder ver cadenas JSON en una forma bonita y sencilla de leer complejas cadenas JSON, de una forma realmente sencilla. Mostrare algunas formas, tu decides cual te conviene.

Python:

cat file.json | python -mjson.tool

Perl:

cat file.json | perl jsonpp.pl
1 2 3 4 5 6 7 8 9
#!/usr/bin/env perl
 
use JSON;
 
my $json = JSON->new;
undef $/;
while (<>) {
print $json->pretty->encode($json->decode($_));
}
view raw jsonpp.pl This Gist brought to you by GitHub.

ps: Most of the info comes from a post at endpoint’s blog

Facebook Twitter Email

Tu dirección de correo no será publicada. Los campos obligatorios están marcados con *

*

Social links powered by Ecreative Internet Marketing