Skip to content

Conversation

@lkumarjain
Copy link

In order to be able to set an array of values and do that efficiently we added SetBytesOptionsManyByGetResult() so that all of the values are set at once instead of having to go through the JSON for each value separately. It inserts each value at a specified index maintaining the diff between the original and inserted value, so that the next time the insert happens, the index of the original value will be moved in accordance with the diff.

The other improvement, if you already searched the JSON and have the result of gjson.Get(), then you can just pass it to sjson.Set() instead of having to fire another search inside.

#57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants