Using standard JSON functions instead of string concatenation