Go 언어에서 Json 파싱하기 위한 구조체(struct) 구성은 일반적으로 어렵지 않지만, JSON 구성에 따라 까다로운 경우가 있다. 이런 경우 다음 URL을 활용하면 쉽게 구조체로 변환해 준다.
https://mholt.github.io/json-to-go/
JSON-to-Go: Convert JSON to Go instantly
This tool instantly converts JSON into a Go type definition. Paste a JSON structure on the left and the equivalent Go type will be generated to the right, which you can paste into your program. The script has to make some assumptions, so double-check the o
mholt.github.io
Written with ♥ by Vincent Han
'소소한 팁' 카테고리의 다른 글
Flutter(dart) https SSL 인증서 오류 (proxy, self-signed 인증서) (0) | 2022.05.11 |
---|---|
JetBrains IDE Terminal에서 vi 명령 모드(escape) 이동이 안되는 경우 설정 방법 (0) | 2021.05.26 |
Go 언어에서 프로세스 실행 타임아웃(timeout) 지정하기 (0) | 2021.02.08 |
IntelliJ IDEA에서 maven이 반영되지 않을 때... (0) | 2020.12.03 |
Generic Methods를 통해 Spring Bean을 casting 없이 처리하는 Utility 클래스 (0) | 2020.10.27 |