Skip to content

Conversation

@bassmanitram
Copy link

@bassmanitram bassmanitram commented Dec 22, 2023

This PR basically does the following:

  • Abstracts the get methods to a trait
  • Implements that trait for serde_json Value, simd_json OwnedValue and simd_json BorrowedValue
  • Updates the code to 2021 semantics

It is a breaking change from the original - the biggest difference being that the behaviour of getting
a Value from a container Value is now implemented on the value type, not the pointer, by virtue of
the new trait. However, ALL aspects of managing the JSON pointer itself are retained exactly as before
(except the update to 2021 semantics.

This of course, begs the question of whether, in fact, the JsonPointer type and its associated
artifacts and code should be in one crate, the new trait in a second, and implementations of that
trait in separate crates. We could then simple update THIS crate to have "legacy" behaviour via
a feature, and separate all the new stuff into the aforementioned crates. To discuss, I guess.

IT IS NOT YET READY! The following (at least) are required:

  • Re-introduction of some stuff I removed while trying to figure out how it worked!
  • "repair" Cargo.toml to reflect this crate's name, version etc etc
  • Features
  • Tests
  • Better "trait" inclusion semantics
  • Answer the above metaphysical questions :)

In the meantime, the functionality is available in a "stopgap" crate

Martin Bartlett added 11 commits December 21, 2023 17:40
DUH! Once the get methods were abstracted to a trait,
serde_json could easily be supported! So this commit generalizes the mods and allows them to be a PR to the
original repo - although there is a lot to do before actually
merging.
* Reverse the Trait - it gets implemented on the target now, not on the pointer.
* Update the doc
* Update the tests to include simd
* Lift to version 0.3.0 (breaks 0.2.0)
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.

1 participant