improved JSON client