0

This question already has an answer here:

I am trying to add some JSON format as listing to a slide but I am getting the error:

Paragraph ended before \lst@next was complete.

How can I add a listing in the latex beamer?

code

\documentclass[xcolor=dvipsnames]{beamer}

\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usetheme{Antibes}
\usecolortheme[named=Maroon]{structure} 
\setbeamercovered{transparent}


\title{Test}
\author{Alex XYZ}
\institute{University XYZ}
\date{20.01.16}



\begin{document}
\beamertemplatenavigationsymbolsempty

\begin{frame}
\titlepage
\end{frame}

\begin{frame}{Service Provider - Request and Response}

\begin{lstlisting}
{
  "mac": "10:B5:S3:06:C6:E9",
  "route":0,
  "latitude":53.834588, 
  "longitude":10.704048,  
  "time":"12.09.2015 13:45:00",
  "speed":3,
  "direction":"",
  "flag": "true"
}  
\end{lstlisting}

\end{frame}

\end{document}

marked as duplicate by Ignasi, user13907, Svend Tveskæg, Romain Picot, Werner Jan 20 '16 at 19:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

Add [fragile] after \begin{frame}

Not the answer you're looking for? Browse other questions tagged or ask your own question.