본문 바로가기
반응형

MVC4

Json 데이터를 C# 코드로 변환 Json 데이터를 C#으로 모델을 만들어야 되는데... 귀찮아 하고 있던 중에... 예전에 같이 일했던 상사분이 알려 준 사이트가 생각나다. 그 때는 그다지 필요한 상황이 아니어서, 그냥 네네하고 넘어갔는데.. 기억이 나서 예전 문서 찾아보니 남아있었고, 사용해 보니, 왜 알려준지 알겠다. 이렇게 편하다니... ㅋㅋ 아래 사이트는 json 데이터를 복사 붙여넣기 하면, 해당 모델만 class로 뽑아준다. 예로 아래는 네이버 길찾기 json 데이터다. { "code": 0, "message": "길찾기를 성공하였습니다.", "currentDateTime": "2023-03-06T00:52:43", "route": { "trafast": [{ "summary": { "start": { "location": .. 2023. 3. 6.
Newtonsoft.Json 검색해보기 schema = JsonSchema.Parse(@"{ 'type': 'object', 'properties': { 'name': {'type':'string'}, 'hobbies': {'type': 'array'} } }"); JObject person = JObject.Parse(@"{ 'name': 'James', 'hobbies': ['.NET', 'LOLCATS'] }"); bool valid = person.IsValid(schema); // true 2015. 7. 31.
HtmlHelper class http://msdn.microsoft.com/en-us/library/system.web.mvc.htmlhelper(v=vs.98).aspx The HtmlHelper type exposes the following members. Constructors Name Description HtmlHelper(ViewContext, IViewDataContainer) Initializes a new instance of the HtmlHelper class by using the specified view context and view data container. HtmlHelper(ViewContext, IViewDataContainer, RouteCollection) Initializes a new in.. 2015. 7. 31.
MVC 강좌 전용뷰어 보기 첨부파일 (1) http://blog.naver.com/PostView.nhn?blogId=empty_wagon&logNo=20147567167&categoryNo=40&parentCategoryNo=0&viewDate=¤tPage=2&postListTopCurrentPage=1&userTopListOpen=true&userTopListCount=30&userTopListManageOpen=false&userTopListCurrentPage=2 2015. 7. 31.
반응형