Updated to use fallback JSON functions