Are there any tricks to get this inline json object to parse? $a[3] is a mako variable containing a url.
<li class="foldernode" yuiConfig='{"type":"TextNode","data":"{'myurl':'${a[3]}'}"}'>
Without the "type" attribute it works:
<li class="foldernode" yuiConfig='{"data":"{'myurl':'${a[3]}'}"}'>
I already had to do something hacky and use '
for single quotes which I then replace with double quotes in javascript. Any general strategies for doing this type of nested quoting would be helpful.
A trick I usually use it to write the object in generic JavaScript, call JSON.stringify on it and copy the result. The result I got was {"type":"TextNode","data":{"myurl":"${a[3]}"}}
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With