summaryrefslogtreecommitdiffstats
path: root/modules/structs/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/structs/user.go')
-rw-r--r--modules/structs/user.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/structs/user.go b/modules/structs/user.go
index 511e4c56ce..9e021e40fe 100644
--- a/modules/structs/user.go
+++ b/modules/structs/user.go
@@ -5,8 +5,9 @@
package structs
import (
- "encoding/json"
"time"
+
+ jsoniter "github.com/json-iterator/go"
)
// User represents a user
@@ -38,6 +39,7 @@ type User struct {
func (u User) MarshalJSON() ([]byte, error) {
// Re-declaring User to avoid recursion
type shadow User
+ json := jsoniter.ConfigCompatibleWithStandardLibrary
return json.Marshal(struct {
shadow
CompatUserName string `json:"username"`