git-report icon indicating copy to clipboard operation
git-report copied to clipboard

Have json.Unmarshal exception on some commits message

Open andy-y-li opened this issue 6 years ago • 1 comments

I Have debug it today, found that: When the jsonStr: [{"commit": "81effe674dfe5d0bfd242112ffa61051a20580e8","refs": "","subject": "templates/user/profile: added rel="me" to website link on user profile (#5485)","body": "* Added rel="me" to website link on user profile

See issue #5008

  • Added nofollow as per feedback ","author": {"name": "Federico Culloca","email": "[email protected]","date": "2018-11-13T02:49:30+01:00"},"commiter": {"name": "Unknwon","email": "[email protected]","date": "2018-11-12T20:49:30-05:00"}}]

It has an exception on these code: invalid character 'm' after object key:value pair

var commits []*GitCommit err = json.Unmarshal([]byte(jsonStr), &commits) if err != nil { return nil, err }

andy-y-li avatar Jul 11 '19 09:07 andy-y-li

@andy-y-li tks you for using and reporting issues for my project :D

Unfortunately, I don't have much free time recently. I would glad to accept any PR addressing this issue.

vanhtuan0409 avatar Jul 15 '19 03:07 vanhtuan0409