2016-11-14 15 views
0

私はいくつかのデータを取得するためにAPIを使用していますが、JSON値の1つにはHTMLが含まれています。 MVCビューにまったく同じHTMLタグを作成して編集する代わりに、表示されているのとまったく同じJSON値のHTMLタグを使用する方法がありますか?私が何を意味するかの例をHERESに十分な記述この波平場合:JSON内のHTML

"detail": "<h1>Overwatch Patch Notes – October 19, 2016</h1>\r\n\r\n<p>A new patch is now live on Windows PC. Read below to learn more about the latest changes.</p>\r\n\r\n<p>To share your feedback, please post in the <a href=\"http://us.battle.net/forums/en/overwatch/22813879/\" target=\"_blank\">General Discussion</a> forum.<br />\r\nFor a list of known issues, visit our <a href=\"http://us.battle.net/forums/en/overwatch/22813881/\" target=\"_blank\">Bug Report </a>forum.<br />\r\nFor troubleshooting assistance, visit our <a href=\"http://us.battle.net/forums/en/overwatch/22813880/\" target=\"_blank\">Technical Support</a> forum.</p>\r\n\r\n<p>Please note that these changes will be rolled into a larger patch for PlayStation 4 and Xbox One at a later date.</p>\r\n\r\n<h2>BUG FIXES</h2>\r\n\r\n<p><strong>General</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed an issue causing the default Overwatch spray to override a player’s chosen spray when watching a Play of the Game or Highlight</li>\r\n\t<li>Fixed an issue causing players to frequently disconnect while viewing Highlights</li>\r\n\t<li>Fixed a bug preventing the appropriate music from playing after a loss on the Junkenstein's Revenge Brawl</li>\r\n</ul>\r\n\r\n<p><strong>Gameplay</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed a bug causing multiple issues when displaying data on the leaderboards</li>\r\n</ul>\r\n\r\n<p><strong>Heroes</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed an issue preventing Ana’s Nano Boost callouts from being heard by the enemy team</li>\r\n\t<li>Fixed a bug preventing players from receiving credit toward the Healing Done commendation when healing D.Va’s mech</li>\r\n\t<li>Fixed a graphical issue that was preventing the liquid in Mei’s Endothermic Blaster from appearing</li>\r\n\t<li>Fixed a bug causing Reinhardt’s Charge to unexpectedly stop when crossing certain thresholds (e.g. when exiting a dropship)</li>\r\n\t<li>Increased the volume of Roadhog’s “Want some candy” voice line</li>\r\n</ul>\r\n\r\n<p><strong>Map</strong></p>\r\n\r\n<ul>\r\n\t<li>Fixed a bug on Eichenwalde that caused some textures to stretch across the map for some players</li>\r\n</ul>\r\n". 

答えて

1

は、あなたが使用するあなたのビュー内Html.Rawを使用することができます。

これは単にJSON値の一つであるが、私はdidntのたくは全部を貼り付け生の文字列値:

@Html.Raw(Model.detail); 

https://msdn.microsoft.com/en-us/library/gg480740(v=vs.118).aspx

+0

そして、ほんの数秒で、あなたは私の人生はずっと良く作られました! –