mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
update for tdlib v1.7.0
This commit is contained in:
parent
a5d1c7ffe7
commit
4a26afe3b0
9 changed files with 9127 additions and 2063 deletions
|
|
@ -144,7 +144,11 @@ func (jsonInt64 JsonInt64) MarshalJSON() ([]byte, error) {
|
|||
|
||||
// UnmarshalJSON unmarshals from json
|
||||
func (jsonInt64 *JsonInt64) UnmarshalJSON(data []byte) error {
|
||||
jsonBigInt, err := strconv.ParseInt(string(data[1:len(data)-1]), 10, 64)
|
||||
if len(data) > 2 && data[0] == '"' && data[len(data)-1] == '"' {
|
||||
data = data[1 : len(data)-1]
|
||||
}
|
||||
|
||||
jsonBigInt, err := strconv.ParseInt(string(data), 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue