don't swallow exceptions and convert arrays to<->from json (if asJSON is...

... present)