question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for java.util.UUID parameter in ktor-locations

See original GitHub issue

Subsystem

Server, ktor-locations

Is your feature request related to a problem? Please describe.

I don’t want to write a custom converter to convert a string to java.util.UUID. Using custom converters makes controllers less reusable and it is less readable especially for new project members.

Describe the solution you’d like

Ktor’s built-in converter supports converting a string to/from java.util.UUID.

Motivation to include to ktor

UUID is a globally unique identifier and commonly used in URLs. In particular, UUID v4 is a handy choice when we need an unguessable or scattering identifier. It is convenient if ktor-locations supports it by default. For example, Spring and Django provide built-in support for UUIDs.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cy6erGn0mcommented, Nov 14, 2020

@orangain there is a chance to get an MPP uuid implementation. Please see https://github.com/cy6erGn0m/kotlinx-uuid preview if still interested

1reaction
orangaincommented, Feb 25, 2020

@cy6erGn0m I know a custom converter can convert a string to UUID, but what I request here is built-in support of java.util.UUID. As I wrote above, I believe UUID is worth built-in support as some Web application frameworks do.

If built-in support of UUID is acceptable, I can send a pull request.

Read more comments on GitHub >

github_iconTop Results From Across the Web

UUID (Java Platform SE 7 ) - Oracle Help Center
Creates a UUID from the string standard representation as described in the toString() method. Parameters: name - A string that specifies a UUID;...
Read more >
Is java.util.UUID supported by jaspersoft - TIBCO Community
I try to create a UUID parameter from a string and I had an error message : java.util.UUID.fromString cannot be resolved to a...
Read more >
Why is java.util.UUID.randomUUID not accepted as a parameter
I have the following function definition: def testGenerateUuids(name: String, uuidFn: () => String, repeats: Int, iterations: Int) { When I call this with:...
Read more >
Guide to UUID in Java - Baeldung
The UUID class has a single constructor that requires two long parameters describing the most significant at the least significant 64 bits:
Read more >
Java.util.UUID class in Java - GeeksforGeeks
The clockSequence value is only meaningful in a time-based UUID, ... The result is true if and only if the argument is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found