Always serialize PHP indexed arrays as JSON arrays, not objects

When an indexed array has a removed item in the
middle (i.e. not sequential indexes anymore) it is not anymore 
serialized as JSON array.
For example in Symfony2, when using Collection Form Type and removing
an item.