consolidated jsonify/to_json functions inside CART2, modified macros