# JSON 직렬화 (.NET) > System.Text.Json, JsonSerializer, custom converters, naming policies, null 처리 - 20 면접 질문 - Mid-Level - [면접 질문: .NET](https://sharpskill.dev/ko/technologies/dotnet/interview-questions.md) ## 1. 최신 .NET에서 JSON 직렬화를 위한 주요 namespace는 무엇입니까? **답변** System.Text.Json은 .NET Core 3.0 이상에서 JSON 직렬화를 위한 공식 namespace입니다. 더 높은 성능을 제공하고 프레임워크에 통합되어 있으며 최신 시나리오에 최적화되어 있어 Newtonsoft.Json(Json.NET)을 점진적으로 대체하고 있습니다. Newtonsoft.Json은 하위 호환성이나 System.Text.Json에서 제공하지 않는 고급 기능을 위해 NuGet을 통해 계속 사용할 수 있습니다. ## 2. C# 객체를 JSON 문자열로 직렬화하려면 어떤 메서드를 사용합니까? **답변** JsonSerializer.Serialize는 C# 객체를 JSON 문자열로 변환합니다. 이 정적 메서드는 직렬화할 객체와 선택적으로 동작을 사용자 정의하기 위한 JsonSerializerOptions를 받습니다. Serialize는 string을 반환하는 반면, SerializeToUtf8Bytes는 string 할당을 피해 성능을 최적화하기 위해 byte[]를 반환합니다. ## 3. JSON 속성에 대한 System.Text.Json의 기본 명명 규칙은 무엇입니까? **답변** 기본적으로 System.Text.Json은 C# 속성 이름을 정확히 보존합니다(대소문자를 구분하는 PascalCase). C# 속성 이름이 UserName이면 JSON에는 UserName이 포함됩니다. camelCase(userName)를 얻으려면 JsonSerializerOptions에 PropertyNamingPolicy = JsonNamingPolicy.CamelCase를 설정해야 합니다. 이는 기본적으로 camelCase를 사용하는 Newtonsoft.Json과 다릅니다. ## 17개 추가 질문 이용 가능 - JSON 문자열을 형식화된 C# 객체로 역직렬화하려면 어떻게 합니까? - JSON 직렬화 중에 속성을 무시하려면 어떤 특성을 사용합니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 .NET 면접 주제 - [C# 기초](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/csharp-basics.md): 25개 질문, Junior - [LINQ & Delegates](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/csharp-linq-delegates.md): 20개 질문, Junior - [C# 언어 핵심 요소](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/csharp-language-essentials.md): 15개 질문, Junior - [ASP.NET Core 기초](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/aspnet-core-fundamentals.md): 18개 질문, Junior - [ASP.NET Core 요청 수명 주기](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/aspnet-core-request-lifecycle.md): 20개 질문, Junior - [Configuration & Settings](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/configuration-settings.md): 20개 질문, Junior - [애플리케이션 라이프사이클](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/application-lifecycle.md): 20개 질문, Junior - [Dependency Injection](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/dependency-injection.md): 24개 질문, Mid-Level - [Entity Framework Core](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/entity-framework-core.md): 25개 질문, Mid-Level - [Minimal APIs](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/minimal-apis.md): 18개 질문, Mid-Level - [Web API 개발](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/web-api-development.md): 22개 질문, Mid-Level - [ASP.NET Core의 Async](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/async-aspnet-core.md): 20개 질문, Mid-Level - [Authentication & Authorization](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/authentication-authorization.md): 18개 질문, Mid-Level - [HttpClient & 네트워킹](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/httpclient-networking.md): 20개 질문, Mid-Level - [Entity Framework Core 고급](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/ef-core-advanced.md): 25개 질문, Mid-Level - [C# 고급 기능](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/csharp-advanced-features.md): 20개 질문, Mid-Level - [Clean Architecture](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/clean-architecture.md): 20개 질문, Mid-Level - [Logging, Monitoring & Observability](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/logging-monitoring.md): 22개 질문, Mid-Level - [단위 테스트와 xUnit](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/unit-testing-xunit.md): 20개 질문, Mid-Level - [통합 테스트](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/integration-testing.md): 18개 질문, Mid-Level - [Docker & Containerization](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/docker-containerization.md): 16개 질문, Mid-Level - [NuGet 패키지 관리](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/nuget-package-management.md): 16개 질문, Mid-Level - [Memory Management & GC](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/memory-management-gc.md): 22개 질문, Senior - [리액티브 프로그래밍](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/reactive-programming.md): 24개 질문, Senior - [Async/await 및 패턴](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/async-await-patterns.md): 26개 질문, Senior - [.NET 디자인 패턴](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/dotnet-design-patterns.md): 24개 질문, Senior - [성능 최적화](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/performance-optimization.md): 22개 질문, Senior - [보안 및 모범 사례](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/security-best-practices.md): 24개 질문, Senior - [SignalR 및 실시간](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/signalr-realtime.md): 22개 질문, Senior - [마이크로서비스 아키텍처](https://sharpskill.dev/ko/technologies/dotnet/interview-questions/microservices-architecture.md): 25개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/dotnet/interview-questions/json-serialization