hiltontj / serde_json_path

Query serde_json Values with JSONPath
https://serdejsonpath.live/
MIT License
50 stars 3 forks source link

[#23] Implement `Display` and `Serialize` for `JsonPath` #26

Closed hiltontj closed 1 year ago

hiltontj commented 1 year ago

This implements the Display and Serialize traits for the JsonPath type. Although there may be a more efficient way to serialize it than using collect_str, my assumption for now is that JSON Path query strings are not too long and this will not be too costly to rely on the Display impl to allocate a string before writing out to the serializer.

Related to #23