Fixed handling of empty json arrays