티스토리 뷰

프로그래밍/기타

asp json 다루기

쇠주는참이슬 2012. 11. 22. 18:51

asp json 다루기

출처 : http://87nyunseng.tistory.com/entry/asp-json-%EB%8B%A4%EB%A3%A8%EA%B8%B0

json2.min.js

asp에서 json(제이슨) 다루는 방법



  1.     //json text  
  2.      "0":{  
  3.         "id":1384045,  
  4.         "title":"scientist with test tube radiant gradient bg",  
  5.         "creator_name":"Jose Gil",  
  6.         "creator_id":6537,  
  7.         "thumbnail_html_tag":"",  
  8.         "thumbnail_width":81,  
  9.         "thumbnail_height":110,  
  10.     }  
  11.   
  12. <script runat="server" language="javascript" src="json2.min.js"></script>   
  13. <%   
  14. 'JSON 파싱   
  15.     Dim myJSON   
  16.     Set myJSON = JSON.parse(jSonText)   
  17.     
  18.     'JSON Object 출력   
  19.     response.write "<BR><BR>"  
  20.     Response.Write "id= " & myJSON.[0].id & "<BR>"  
  21.     Response.Write "title= " &  myJSON.[0].title & "<BR>"  
  22.     Response.Write "creator_name= " &  myJSON.[0].creator_name & "<BR>"  
  23.     Response.Write "creator_id= " &  myJSON.[0].creator_id & "<BR>"  
  24.     Response.Write "thumbnail_html_tag= " &  myJSON.[0].thumbnail_html_tag & "<BR>"  
  25.     Response.Write "thumbnail_width= " &  myJSON.[0].thumbnail_width & "<BR>"  
  26.     Response.Write "thumbnail_height= " &  myJSON.[0].thumbnail_height & "<BR>"  
  27. %>  

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함