Velocity script breaking
Hi there,
I tried to implement a simple velocity script to parse out a JSON object and it is giving me this error:
Cannot get email content- <div>An error occurred when procesing the email Body! </div> <p>Lexical error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 2, column 1. Encountered: "\uff8a" (65418), after : "" near</p> <div><pre >#end</pre><pre >#set($parsedJson = '#set($parsedJson='+ $data+')')</pre><pre class="x-form-item-label">#evaluate($parsedJson)</pre><pre >$parsedJson['proofpoint']</pre><pre ></pre></div>
The JSON object I imported was:
{"proofpoint":"This is a test proof point","subject line":"test subject line","EID":"1234"}
and the velocity script (for online the proof point token) was:
#set($data = ${scoutContentEngine_cList.get(0).xLROppy})
#if($data.isEmpty())
#set($data='{}')
#end
#set($parsedJson = '#set($parsedJson='+ $data+')')
#evaluate($parsedJson)
$parsedJson['proofpoint']
Any ideas as to why this is happening?