Flexjsonã使ã£ã¦Genericsãªã¯ã©ã¹ã¸ãã·ãªã¢ã©ã¤ãºãã
Flexjsonã§Genericsãªã¯ã©ã¹ã¸ã®ãã·ãªã¢ã©ã¤ãºããã¾ããããããã£ã¦ã¾ããã
ã§ã調æ»ã®çµæããããã°ãã¾ãããã¨ããã®ãã以ä¸ã®ã³ã¼ãã
ãã·ãªã¢ã©ã¤ãºã¯fromJson(String)ã§è¡ã£ã¦ãã¾ãããããã§ã®ãã¤ã³ãã¯ãï¼ã¤ã
ãããè¡ããªãã¨ã¯ã©ã¹ãã£ã¹ããåºæ¥ãªãã¨æããã¾ããï¼ããã§å¤§åããã£ãã»ã»ã»ï¼
java.lang.ClassCastException: java.util.HashMap cannot be cast to jp.co.pooh.FlexJsonTest.Person
at jp.co.pooh.FlexJsonTest.Person.fromJson(Person.java:33)
at jp.co.pooh.FlexJsonTest.PersonTest.testFromJson(PersonTest.java:16)
ã»ã»ã»
2011/06/13追è¨
以ä¸ã®ããã«æ¸ãã¦ããã°ãTã®æ°åã ããã·ãªã¢ã©ã¤ãºç¨ã¡ã½ãããç¨æããå¿
è¦ã¯ããã¾ãããã