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

Implement functionality to parse getSession() response data efficiently #350

Closed
tnt-freskim-veliu opened this issue Apr 23, 2023 · 6 comments

Comments

@tnt-freskim-veliu
Copy link
Contributor

Describe the feature

To simplify the process of obtaining the user object from the getSession() response, I would like to parse the JSON data directly from the request and retrieve the user object from the "data" property. Currently, I am required to store the entire response and extract the user object each time, which is inefficient.

My response json almost all the time is like this:

{ "data": {...user}, "status_code": 200, "message" : "Success", }

Additional information

No response

@BracketJohn
Copy link
Contributor

Any idea how we should implement this?

One idea: We could give the option to also specify a jaon pointer to the actual session data, so that the right subfield will be extracted

@tnt-freskim-veliu
Copy link
Contributor Author

Yes, that would be a good idea.

@BracketJohn
Copy link
Contributor

cc @Danielwinkelmann btw for more json-pointer use-cases!

@Danielwinkelmann
Copy link
Contributor

@BracketJohn I implement the feature in the new PR

@valh1996
Copy link
Contributor

Hi @zoey-kaiser, why did you put this completed if it hasn't been merged for 6 months now and review is pending on the PR?

@phoenix-ru phoenix-ru reopened this Mar 14, 2024
@phoenix-ru
Copy link
Collaborator

Closed via #592

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 a pull request may close this issue.

6 participants