From 9892e2c36b930efdc88d1eb1bc52d8505cd0d3d4 Mon Sep 17 00:00:00 2001 From: Sergey Kuzmenko Date: Tue, 5 Nov 2019 23:11:39 +0300 Subject: [PATCH] FIX: JsonInt64.MarshalJSON missing quotes --- client/tdlib.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/tdlib.go b/client/tdlib.go index fe27fb9..4214288 100644 --- a/client/tdlib.go +++ b/client/tdlib.go @@ -138,8 +138,8 @@ func buildResponseError(data json.RawMessage) error { type JsonInt64 int64 // MarshalJSON marshals to json -func (jsonInt64 *JsonInt64) MarshalJSON() ([]byte, error) { - return []byte(strconv.FormatInt(int64(*jsonInt64), 10)), nil +func (jsonInt64 JsonInt64) MarshalJSON() ([]byte, error) { + return []byte(`"`+strconv.FormatInt(int64(jsonInt64), 10)+`"`), nil } // UnmarshalJSON unmarshals from json