ajax/thread_notifier updated to output JSON for API responses