json-rust icon indicating copy to clipboard operation
json-rust copied to clipboard

Insert at a given position in `Object`

Open timothee-haudebourg opened this issue 4 years ago • 0 comments

Hi,

if I understand well, since #68 the order of an object entries is preserved during parsing. However the Object::insert function still always appends elements at the end. I believe this could be easily improved to allow insertion at any given position.

This would be particularly useful for my json-ld crate, where I sometimes need to add a special "@context" entry preferably in first position.

timothee-haudebourg avatar Dec 23 '20 13:12 timothee-haudebourg