해결
자료형을 json.Number 로 받고
사용시 형변환 하여 사용한다
https://stackoverflow.com/questions/48443495/convert-json-number-into-int-int64-float64-in-golang
Convert Json.Number into int/int64/float64 in golang
I have a variable data, which is an interface. When I print its type I get it as json.Number. How do I type cast to int/int64/float64 If I try data.(float64), it ends up with panic error panic:...
stackoverflow.com
[Golang] JSON marshal/unmarshal시 값의 오차
위 글도 꼭 다시 읽어보기 좋은 글
https://yoongrammer.tistory.com/40
[Go] JSON 패키지 알아보기
목차 [Go] JSON 패키지 알아보기 JSON (JavaScript Object Notation)은 간단한 데이터 교환 형식입니다. json 패키지를 사용하면 go프로그램에서 JSON 데이터를 읽고 쓸 수 있습니다. Encoding JSON 데이터를 인코.....
yoongrammer.tistory.com
아직 정확한 정리가 안되었다. 일단 해결하고 봄 . 추후 다시 정리
'Web > GoLang' 카테고리의 다른 글
[golang] json 파싱시 개행으로 인한 파싱오류, 문자열 강제 replace (0) | 2021.11.15 |
---|---|
[golnag] json 관련 문서 (0) | 2021.08.27 |
[golang] URL 인코딩 방법 (0) | 2021.08.27 |
[golang] interface{}로 json 언마샬 디코딩 하기 (0) | 2021.08.24 |
[golang] 몽고 빈값 체크 (0) | 2021.08.17 |
댓글