How to parse JSON string in Python

When developing a web service, you may often rely on a JSON-based web service protocol. If you are using Python for that, it is straightforward to deal with JSON-formatted messages due to its extensible modules. For example, Python’s JSON module which was introduced in Python 2.6 provides default JSON encoder and decoder in Python. There […]
Continue reading…

 

How to parse JSON string via command line on Linux

If you often deal with JSON-formatted texts from the command line or in shell scripts, you may wonder if there is any command-line utility which can parse JSON string. A command-line JSON parser can be handy when you test or debug JSON web services. You can feed JSON-formatted responses from web services into the command-line […]
Continue reading…

 

How to parse JSON string in Perl

If you need to parse a JSON-formatted string in Perl, you can use JSON Perl module. The JSON module contains JSON-specific decode/encode functions that convert a JSON string into a Perl data structure, and vice versa. Here is how to parse JSON string in Perl. First, install JSON Perl module from CPAN: $ sudo perl […]
Continue reading…