html.raw, aby wymienić model
<script type="text/javascript">
var obj = JSON.parse(document.getElementById('appdata').dataset.obj);
</script>
Relieved Rat
<script type="text/javascript">
var obj = JSON.parse(document.getElementById('appdata').dataset.obj);
</script>
<div id="appdata" data-obj="@Json.Encode(Model)"></div>