Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 22nd, 2011  |  syntax: None  |  size: 0.51 KB  |  views: 155  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. The Java unit test:
  2. public void testAnimation() throws JsonParseException, JsonMappingException, IOException {
  3.     ObjectMapper mapper = new ObjectMapper();
  4.     Animation animation = mapper.readValue(new File("data/entityTest.json"), Animation.class);
  5. }
  6.  
  7. The JSON:
  8. {
  9.     "frames" : [ {
  10.         "ref" : "data/bullet.jpg"
  11.     } ],
  12.     "duration" : 1
  13. }
  14.  
  15. The error:
  16. org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "frames" (Class org.newdawn.slick.Animation), not marked as ignorable