minio / simdjson-go

Golang port of simdjson: parsing gigabytes of JSON per second
Apache License 2.0
1.8k stars 85 forks source link

Get field position #79

Closed stokito closed 1 year ago

stokito commented 1 year ago

I need to know not only a field value but also it's position e.g. something like:

reqId, pos, err = propsIter.String()

Ideally I also need to know the posEnd but I can live without it. I changed the library and exposed the iter.off field and tried to count myself shifts but this is too complicated to follow many iteartions. Is it something that is easy to implement or maybe someone else need this functionality?

I need this because I trying to perform in-place replacements of the JSON.

klauspost commented 1 year ago

I don't think there is a 1:1 mapping recorded.

We have added In-place Value Replacement recently. That allows certain values to be replaced or deleted.

That is what we can offer in that respect.