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

Refactor deserialization of SearchEntry #19

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Conversation

keaz
Copy link
Owner

@keaz keaz commented Nov 26, 2024

This pull request includes several changes to the simple-ldap project, primarily focusing on updating dependencies and refactoring the LdapClient implementation to simplify JSON handling and mapping of search results to structs.

Dependency Updates:

  • Updated the version in Cargo.toml from 2.1.0 to 2.1.1.
  • Added serde-value = "0.7.0" to the dependencies in Cargo.toml.

Refactoring JSON Handling:

  • Removed the create_json_signle_value, create_json_multi_value, and map_to_struct methods from LdapClient and replaced them with to_signle_value and to_multi_value functions for converting search results directly to structs using serde_value. [1] [2] [3]
  • Updated the to_record and to_multi_valued_record_ methods in the Record struct to use the new to_signle_value and to_multi_value functions.

Test Adjustments:

  • Modified the test cases to use the new to_signle_value and to_multi_value functions instead of the removed JSON creation and mapping methods. [1] [2] [3]

@keaz keaz self-assigned this Nov 26, 2024
@keaz keaz linked an issue Nov 26, 2024 that may be closed by this pull request
@keaz keaz merged commit a8b0ecd into main Nov 26, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Improve deserialize
1 participant