Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Export an expression to JSON without escaping forward slashes
Export a string as JSON without escaping forward slash characters:
In[1]:= | ![]() |
It is valid JSON with or without the escapes:
In[2]:= | ![]() |
Out[2]= | ![]() |
Compare to standard JSON Export which escapes forward slashes:
In[3]:= | ![]() |
After importing they are equivalent:
In[4]:= | ![]() |
Out[4]= | ![]() |
A backslash before a forward slash is left unchanged:
In[7]:= | ![]() |
In[8]:= | ![]() |
ExportDeescapedJSON requires data to match the "RawJSON" formatting:
In[9]:= | ![]() |
Out[9]= | ![]() |
Use Association instead of a list:
In[10]:= | ![]() |
Out[10]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License