tidwall / gjson

Get JSON values quickly - JSON parser for Go
MIT License
13.95k stars 841 forks source link

Add MakeResult(type Type, value ... interface {}) Result #277

Open bjoerndemeyer opened 2 years ago

bjoerndemeyer commented 2 years ago

I would like to be able to make Result types myself from non-json sources for use with Result.Less, etc, without having to use Parse(). Since Result's members are exported it's possible to construct it myself, but its is somewhat awkward and risks getting out of synch with this library. I am willing to provide aPR if this MakeResult seems a good idea. Or perhaps the name should be different.