Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace custom csv_mapping::traverse with JSONPath #193

Open
robfitzgerald opened this issue Apr 23, 2024 · 0 comments
Open

replace custom csv_mapping::traverse with JSONPath #193

robfitzgerald opened this issue Apr 23, 2024 · 0 comments
Labels
rust Applies to the rust code

Comments

@robfitzgerald
Copy link
Collaborator

there's a hand-rolled method to perform JSONPath-like traversals of serde Value classes, but it only supports object-style paths such as request.origin_x or route.traversal_summary.distance. but in the age of k-shortest path results, we now may have an array of routes or trees. to traverse to the traversal summary of the route at index 2, one should be able to provide the path route[2].traversal_summary.distance.

fortunately, this has been solved: https://docs.rs/serde_json_path/latest/serde_json_path/

install this and swap it out for the custom traverse method.

@robfitzgerald robfitzgerald added the rust Applies to the rust code label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Applies to the rust code
Projects
None yet
Development

No branches or pull requests

1 participant