You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
serde-json has support for order-preserving representation of serde_json::Value under feature preserve_order, which switches Object representation from regular HashMap to IndexMap.
Is this something possible to add in simd-json as well?
Stable, ordered, roundtrips are useful in many applications of JSON editing.
If you want to take a stab at it this is where the code for the value lives, it might need some work in value-trait, not 100% sure haven't checked, too but that should be copy & pasta for the most part.
Otherwise I'll put it on the todo list but can't promise when I'll get around to it :)
I decided to try the library on just the parsing parts for my large datastructures for now, but found it's actually slightly slower than serde-json, so probably not going to work on enhancements for now. Not sure whether that's just because of Serde layers + custom Deserialize implementations involved or something else.
It's hard to say without knowing more about the parsing, the data structure and the system it's running on. For large datastructures simd-json should be significantly faster, but there is a should in there ;). That said it's worth using simd-json-derive instead of serde-derive as it is better optimized for json parsing.
Activity
Licenser commentedon Mar 25, 2023
Heya, that should be doable and fairly easy.
If you want to take a stab at it this is where the code for the value lives, it might need some work in value-trait, not 100% sure haven't checked, too but that should be copy & pasta for the most part.
Otherwise I'll put it on the todo list but can't promise when I'll get around to it :)
RReverser commentedon Mar 26, 2023
I decided to try the library on just the parsing parts for my large datastructures for now, but found it's actually slightly slower than serde-json, so probably not going to work on enhancements for now. Not sure whether that's just because of Serde layers + custom
Deserializeimplementations involved or something else.Licenser commentedon Mar 26, 2023
It's hard to say without knowing more about the parsing, the data structure and the system it's running on. For large datastructures simd-json should be significantly faster, but there is a should in there ;). That said it's worth using simd-json-derive instead of serde-derive as it is better optimized for json parsing.
lmmx commentedon Oct 8, 2025
Duplicate of #378
RReverser commentedon Oct 8, 2025
@lmmx Techbically the other way around :)