Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yurisasuke/golang-decode-string-json-to-int
Cannot unmarshal string into Go value of type int
https://github.com/yurisasuke/golang-decode-string-json-to-int
Last synced: 7 days ago
JSON representation
Cannot unmarshal string into Go value of type int
- Host: GitHub
- URL: https://github.com/yurisasuke/golang-decode-string-json-to-int
- Owner: yurisasuke
- Created: 2021-04-25T07:17:25.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-25T07:48:05.000Z (almost 4 years ago)
- Last Synced: 2024-11-23T08:08:46.380Z (2 months ago)
- Language: Go
- Size: 1.95 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# golang-decode-string-json-to-int
Cannot unmarshal string into Go value of type intAn int type alias that will allow you to send int fields as string
This will prevent you from getting the error `json: cannot unmarshal string into Go struct field Item.item_id of type int` when you try
to convert the json into a struct.