JSON과
XML 사이에서 어떻게 의식적으로 선택할지 살펴봅니다: “data vs document”, primitive type typing (
true,
123,
"text",
null), lists, attributes, ordering, and schemas/validation. Kotlin examples로, 왜
JsonElement 트리가 불안정한 구조에 편리한지, 왜 parsing을 business validation과 분리해야 하는지, 그리고 왜 생성은 문자열을 이어 붙이는 방식이 아니라
buildJsonObject로 하는 편이 좋은지 보여줍니다.