Treat "undefined" as "null" when converting Json arrays to string. Fixes #735.