tojsonhash, and keep arrays as non-assoc