what is the difference between web-safe key and URL-safe key?

167 views
Skip to first unread message

Baqir Rizvi

unread,
Jun 9, 2016, 7:04:24 AM6/9/16
to objectify-appengine
I can see two entity identifiers web-safe key and URL-safe-key having different content. When should they be used?

Jeff Schnitzer

unread,
Jun 9, 2016, 11:54:03 AM6/9/16
to objectify-appengine
What is this “URL-safe-key” and how do you get it? There are two string representations of a key:

Key<?>.toWebSafeString() and its alias Key<?>.getString() return the native KeyFactor.keyToString() value. Looks like “aghzfnZvb3N0MHIOCxIFRXZlbnQYtPqwBgw”.

Key<?>.toString() just returns a regular toString() of the raw key - looks something like “Key(Thing(123))”.

You have something else?

Jeff

On Thu, Jun 9, 2016 at 4:04 AM, Baqir Rizvi <baqir.g...@gmail.com> wrote:
I can see two entity identifiers web-safe key and URL-safe-key having different content. When should they be used?

--
You received this message because you are subscribed to the Google Groups "objectify-appengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectify-appen...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages