Skip to content

Instantly share code, notes, and snippets.

@whaley
Created July 10, 2013 20:37
Show Gist options
  • Select an option

  • Save whaley/5970099 to your computer and use it in GitHub Desktop.

Select an option

Save whaley/5970099 to your computer and use it in GitHub Desktop.
ObjectNode equality? jackson 2.2.2
@Test
public void testObjectNodesWithKeysInDifferentOrder() {
ObjectNode a = JsonNodeFactory.instance.objectNode();
a.put("foo",1);
a.put("bar",2);
ObjectNode b = JsonNodeFactory.instance.objectNode();
b.put("bar",2);
b.put("foo",1);
assertEquals(a,b); //This fails
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment