fixed json conversion for array