I am using minted .
You must install and configure it first (remember to add the pygmentize.cmd file on Windows 7). Then you should add \usepackage{minted} to LaTeX Preambel and finally paste the following code into the TeX Code field (for JSON you can use the js code type):
\begin{listing} \begin{minted}[frame=single, framesep=3mm, linenos=true, xleftmargin=21pt, tabsize=4]{js} { "firstName": "John" "lastName" : "Smith", "age" : 25 } \end{minted} \caption{JSON example} \label{json-example} \end{listing}
This is not an ideal solution, but it works and produces a really good list: 
Lukasz R.
source share