I need to change output for some static JSON data within a Razor view. What I'm trying to do is along the lines of
, actions: { // <- this is JSON curly bracker
listAction: '/Operations/Get'
@if(ViewBag.AllowInput)
{ // <- this is Razor curly bracker
, createAction: '/Operations/Create'
, deleteAction: '/Operations/Delete'
} // <- this is Razor curly bracket
} // <- this is JSON curly bracker
However, JSON markup gets messed with Razor curly brackets. Is there any alternative syntax, or, perhaps, do I do something really stupidly wrong?