[Application] Added an optional $encode parameter to AbstractController::json()