convert to javascript arrays where possible and allow simple unserialization