-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
JwtParser to parse CharSequence instead of String? #328
Comments
I am not sure I agree with having My main concern here is that implementations of |
I don't understand the request exactly - can you show a code snippet example of what you're asking for? |
Closing due to inactivity or follow up from OP. |
well somehow I missed the notifications for the followup questions... this awesome email spam filters in action... the idea is when parsing from some source CharSequence is a bit more flexible... (String, StringBuilder ...) for an example, in class Integer you have both:
and: in case on JWT, lets say the web token needs to be parsed out of a string like: "Bearer [JWT token]" I want tp avoid doing a substring() and allocate memory for no good reason.. having a CharSequence parsing variant I could simply do: parse(myString, "Bearer ".length(), myString.length()) The existing interfaces don't need to be changed.... |
Reopening, but I don't know when we'll get to it. This is low priority given the 1.0 feature set we need to support. |
The IO Streams work commited via b687ca5 makes this much easier, so we can sneak it in for 0.12.0. I should have a PR shortly. |
Closes #328 - Ensured Parser worked with CharSequence, InputStream and Reader, not just String - Changed Deserializer#deserialize(InputStream) to deserialize(Reader) - JwtParser now extends from Parser to support these additional methods. - Changed remaining JwtParser.parse* methods to accept CharSequence arguments instead of String args.
JwtParser parameters that get parsed are all String, can these be made to CharSequence? it would make this a bit more flexible...
The text was updated successfully, but these errors were encountered: