<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>JSON on 얼쑤 · Team Edo</title><link>https://team-edo.github.io/tags/json/</link><description>Recent content in JSON on 얼쑤 · Team Edo</description><generator>Hugo</generator><language>ko-kr</language><lastBuildDate>Sun, 08 Nov 2026 00:00:00 +0900</lastBuildDate><atom:link href="https://team-edo.github.io/tags/json/index.xml" rel="self" type="application/rss+xml"/><item><title>1.76MB 곡 목록에서 악보 덜어내기</title><link>https://team-edo.github.io/posts/2026/11/song-list-payload-and-gzip/</link><pubDate>Sun, 08 Nov 2026 00:00:00 +0900</pubDate><guid>https://team-edo.github.io/posts/2026/11/song-list-payload-and-gzip/</guid><description>&lt;p>얼쑤의 곡 목록 API를 Swagger UI에서 열었더니 &lt;code>Could not render responses&lt;/code>가 표시됐습니다. 브라우저 콘솔에는 &lt;code>Maximum call stack size exceeded&lt;/code>가 남았습니다. 응답을 살펴보니 111곡을 담은 JSON이 약 1.76 MB였고, 그중 약 99%가 곡마다 붙은 &lt;code>score&lt;/code>였습니다. 곡 하나를 고르는 화면에서 111곡의 악보까지 받고 있었습니다.&lt;/p>
&lt;h2 id="곡을-고를-때-필요한-필드만-목록에-남겼다">목록에서 악보 본문 분리&lt;/h2>
&lt;p>곡 하나당 메타데이터는 평균 189바이트였고, 악보는 평균 약 16 KB였습니다. 악보가 들어간 응답 타입을 목록과 상세에서 함께 쓴 결과였습니다. 곡이 늘면 각 곡의 악보 크기만큼 목록 응답도 함께 커지는 구조였습니다.&lt;/p></description></item><item><title>Jackson 3에서 JSON 배열과 누락 필드 읽기</title><link>https://team-edo.github.io/posts/2026/11/read-stored-json-trees-with-jackson/</link><pubDate>Mon, 02 Nov 2026 00:00:00 +0900</pubDate><guid>https://team-edo.github.io/posts/2026/11/read-stored-json-trees-with-jackson/</guid><description>&lt;p>학습 단계의 설명과 채점에 쓸 악보는 DB에 JSON으로 저장합니다. 학습 단계에서 잘못된 항목을 건너뛰면 화면에 설명이 빠진 채 나타납니다. 악보에서 정수를 잘못 읽으면 음표의 길이나 시작 박을 다르게 해석할 수 있습니다. 두 파서에서 저장값을 읽는 지점에 입력 계약을 드러냈습니다.&lt;/p>
&lt;h2 id="배열-노드에서-원소를-꺼낸-뒤-변환했다">배열 원소를 꺼내 변환&lt;/h2>
&lt;p>학습 단계에는 할 일과 운지 설명처럼 배열로 저장하는 항목이 있습니다. Jackson 3의 &lt;code>JsonNode.map&lt;/code>은 노드 자체에 함수를 적용합니다. 배열의 각 원소를 변환하려면 노드가 배열인지 확인하고 &lt;code>values()&lt;/code>로 원소를 꺼낸 뒤 Kotlin의 &lt;code>map&lt;/code>을 적용합니다.&lt;/p></description></item></channel></rss>