Skip to content
Discussion options

You must be logged in to vote

Thank you for your input! It is probably a bit hidden in the manual, but you can always address the whole JSON string (at the root level, so to say) with the pseudo key .. In this case, you can make use of this as follows:

\documentclass{article}
\usepackage{jsonparse}

\begin{document}

\JSONParse{\myjson}{
  [ "foo", "bar", "baz" ]
}

\JSONParseArrayUse{\myjson}{.}{, }

\newcommand{\myfunction}{\emph{\JSONParseArrayValue}, }
\JSONParseArrayMapFunction{\myjson}{.}{\myfunction}

\JSONParseArrayMapInline{\myjson}{.}{
    \JSONParseValue{\myjson}{[#1]}
}

\end{document}

Is this what you're aiming for?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mkaut
Comment options

Answer selected by mkaut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants