new version which replaces json with json_pure