Apollo - 7 months ago 100
LaTeX Question

# Writing LaTeX in JSON file

How would I include the math symbol Pi in a JSON file? \p seems to be reserved in JSON.

{
"Text": "This is the symbol for the number Pi: $\pi$",
"Type": "A"
}


You need to escape the backslash "This is the symbol for the number Pi: $\\pi$". Otherwise, the string literal tries to interpret \p in the same way that it would interpret something like \n.