Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

# golang-decode-string-json-to-int
Cannot unmarshal string into Go value of type int

An 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.