tidwall / gjson

Get JSON values quickly - JSON parser for Go
MIT License
14.21k stars 847 forks source link

Convert Interface to Gjson.Result #275

Open sahil0604 opened 2 years ago

sahil0604 commented 2 years ago

How to convert interface{} to gjson.Result

jshlbrd commented 2 years ago

It should be possible to do this by combining GJSON with SJSON. Put the interface{} into a temporary JSON object or key with SJSON, then get it with GJSON.