Dictionary to Json object, "Expected expression"
Posted
by MrW
on Stack Overflow
See other posts from Stack Overflow
or by MrW
Published on 2010-05-26T16:15:14Z
Indexed on
2010/05/26
16:21 UTC
Read the original article
Hit count: 189
I'm trying to convert a dictionery into a json object, so that I can work with it in my front end.
sortFields = <%= SchrodersHtmlHelper.ToJson(ViewData["SortInfo"])%>;
However, I keep on getting "Expected expression" for this all the time and I'm clueless why. Could anyone explain to me what I'm doing wrong?
Edit: The conversion works fine, but I still get this issue in the front end, causing the browser to complain about it.
© Stack Overflow or respective owner