So in 8.1 and in general we need to build a lot of JSON and we need to use the char " to do so. A common error you will get is:
Please use apostrophe symbol ` instead of " in strings.
How does everyone else get around this? Because the ` doesn't work. Here are my learnings:
A. this doesn't work: it generates JSON with the char ` and not "
Vis_Template.JSON='{
Company: <<Vis_Template.CompanyName>>,
}'
B. this doesn't work: throws error in Config tool : Please use apostrophe symbol ' instead of " in strings.
Vis_Template.JSON='{
"Company": "<<Vis_Template.CompanyName>>",
}'
C. this doesn't work: throws error in Config tool : Please use apostrophe symbol ' instead of " in strings.
Vis_Template.JSON="{
'Company': '<<Vis_Template.CompanyName>>',
}"
D. Will show correctly on a form but in the database stores it like that. So no good.
Vis_Template.JSON='{
"Company": "<<Vis_Template.CompanyName>>",
}'
E. this works, but it's hard to read/maintain and when generating large JSON it seems a lot of work for something basic
Vis_Template.JSON='{
<<SystemSettings.Apos>>Company<<SystemSettings.Apos>>: <<SystemSettings.Apos>><<Vis_Template.CompanyName>><<SystemSettings.Apos>>,
}'
F. this doesn't work (escaping the char): throws error in Config tool : Please use apostrophe symbol ' instead of " in strings.
Vis_Template.JSON='{
\"Company\":\ "<<Vis_Template.CompanyName>>\",
}'
Finally I also tried generating it in a .txt doc but then I couldn't figure out an elegant way of getting that contents into a plaintext attribute (Vis_Template.JSON) without exporting to file and importing .