title: Serialize a document that contains arrays
body: <p>I'm using MongoDB and C# to record the coordinates of my game players. My collection contains documents that follow the following structure:</p>
  
  <pre><code>{
      "_id" : ObjectId("5d12bc34c45f0a1a685db405"),
      "Coordinates" : [ 
          {
              "x" : -5.75,
              "y" : -0.47392401099205
          }, 
          {
              "x" : -5.75,
              "y" : -0.481772005558014
          }],
          "Player" : "Player 1"
  }
  </code></pre>
  
  <p>But I'm having some issues serializing this information, I tried something like that:</p>
  
  <pre><code>public class Scores  {
  
   [MongoDB.Bson.Serialization.Attributes.BsonElement]
   public ObjectId _id { get; set; }
   public Object[] Coordinates { get; set; }
   public float x  { get; set; }
   public float y  { get; set; }
   public string Player { get; set; }
  }
  ...
  foreach (var document in scoreCollection.Find(new QueryDocument("Player", "Player1"))){
      Debug.Log ("Get one info: \n" + document);
  }
  </code></pre>
  
  <p>But I keep receiving this error:</p>
  
  <blockquote>
    <p>Element 'x' does not match any field or property of class
    UnityEngine.Object.
    MongoDB.Bson.Serialization.BsonClassMapSerializer.Deserialize</p>
  </blockquote>
  
  <p>How can I fix my code?</p>