Changed to use JSON.