Skip to content
Snippets Groups Projects
Commit 940de449 authored by ale's avatar ale
Browse files

Prevent infinite recursion

parent 9fe61785
Branches
No related tags found
No related merge requests found
......@@ -34,8 +34,9 @@ var (
type maybeString string
func (s *maybeString) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(data, s); err != nil {
*s = ""
var tmp string
if err := json.Unmarshal(data, &tmp); err == nil {
*s = maybeString(tmp)
}
return nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment