JSON → Go 구조체
JSON 샘플에서 중첩 타입을 포함한 JSON 태그가 있는 Go 구조체를 생성합니다.
입력
결과
사용 방법
Generate Go structs
Paste a representative JSON object and run Convert. Field types are inferred from the sample values.
- Paste a JSON object.
- Click Convert.
- Copy the generated Go code.
Type inference
Whole numbers become int, decimals become float64, booleans become bool, strings become string and nested objects become named structs.
자주 묻는 질문
Why is a null field typed as interface{}?
A null value gives no type information, so the generator falls back to interface{}.
Does it handle arrays of objects?
Yes. Arrays become slices, and arrays of objects produce a nested struct type.
관련 도구
JSON을 TypeScript로
선택적 타입과 유니온 타입을 지원하는 TypeScript 인터페이스를 JSON 샘플에서 생성합니다.
JSON을 C# 클래스로
JSON 샘플에서 클릭 한 번으로 강력한 형식의 C# 클래스를 생성합니다.
JSON 평탄화 및 복원
중첩된 JSON을 점 표기 키로 변환하고 평면 데이터에서 중첩 객체를 다시 만듭니다.
JSON 포매터
설정 가능한 들여쓰기, 오류 강조, 원클릭 복사로 JSON을 정리하고 검증합니다.
JSON 검증기
JSON이 유효한지 확인하고 구문 문제에 대한 명확한 설명을 보여줍니다.
JSON 압축기
불필요한 공백과 줄바꿈을 모두 제거하여 가능한 가장 작은 JSON 페이로드를 만듭니다.