Update JsonSerializationVisitor.php

Bug fix inconsistent serialization to JSON when array contain empty elements