title: Jackson serialization of ArrayList - could there be a bug here?
body: <p>I am using Jackson to serialize an <code>ArrayList</code> of <code>Map</code> objects into JSON format. </p>
  
  <p>My problem is the order of elements in the serialized JSON list is different to the order I have defined in the <code>ArrayList</code>.</p>
  
  <p>I am using Jackson 1.0.1 (I'm being forced to use such an old version because of the container that is running this code). </p>
  
  <p>Could this be a bug with the Jackson serialization? </p>
  
  <p>Here is my code:</p>
  
  <pre><code>Map&lt;String, Object&gt; myObject = new HashMap&lt;String,Object&gt;();
  List&lt;Map&lt;String, Object&gt;&gt; listOfMaps = new ArrayList&lt;Map&lt;String, Object&gt;&gt;();
  // Omitting code that populates the list...    
  myObject.put("MyList", listOfMaps)
  Map&lt;String, Object&gt;&gt; firstElement = listOfMaps.get(0);
  
  // Jackson serialization below:
  ObjectMapper mapper = new ObjectMapper();
  StringWriter writer = new StringWriter();
  mapper.writeValue(writer, myObject);
  </code></pre>
  
  <p>When I look at the serialized JSON,  I notice a different object appears as the first element. </p>
  
  <p>Any suggestions appreciated...</p>