\documentclass{article}
\usepackage{minted}
\begin{document}
This is a python
\begin{minted}[escapeinside=||]{py}
def f(x):
y = x|\colorbox{green}{**}|2
return y
\end{minted}
This is a json
\begin{minted}[escapeinside=||]{json}
{
"hello":"world|\colorbox{green}{**}|"
}
\end{minted}
\end{document}
Got a problem that i can show the green box in python code, but i cannot get green box in json code. My guess is because the curly braces of json. I tried \{ \} but doesn't work.

Got another problem about the color of the json.
This is a normal json
\begin{minted}{json}
{
"hello":"world",
"hell":"worl",
"hello1":"world1"
}
\end{minted}
This is a json with color problem
\begin{minted}[escapeinside=||]{json}
{
"hello":|\colorbox{green}{**}|"world",
"hell":"worl",
"hello1":"world1"
}
\end{minted}
This is a json with color problem but without green box
\begin{minted}[escapeinside=||]{json}
{
"hello":"world",
"hell":"worl",
"hello1":"world1"
}
\end{minted}

