Fixed handling of optional arrays in JsonProvider (closes #421)