{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/1357","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/1357/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/1357/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/1357/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-java/issues/1357","id":186315091,"number":1357,"title":"Return value from Key.toUrlSafe() is inconsistent with the URL-safe key displayed in Google Cloud Datastore Console","user":{"login":"sai-pullabhotla","id":20157348,"avatar_url":"https://avatars2.githubusercontent.com/u/20157348?v=3","gravatar_id":"","url":"https://api.github.com/users/sai-pullabhotla","html_url":"https://github.com/sai-pullabhotla","followers_url":"https://api.github.com/users/sai-pullabhotla/followers","following_url":"https://api.github.com/users/sai-pullabhotla/following{/other_user}","gists_url":"https://api.github.com/users/sai-pullabhotla/gists{/gist_id}","starred_url":"https://api.github.com/users/sai-pullabhotla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sai-pullabhotla/subscriptions","organizations_url":"https://api.github.com/users/sai-pullabhotla/orgs","repos_url":"https://api.github.com/users/sai-pullabhotla/repos","events_url":"https://api.github.com/users/sai-pullabhotla/events{/privacy}","received_events_url":"https://api.github.com/users/sai-pullabhotla/received_events","type":"User","site_admin":false},"labels":[{"id":175662213,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/API:%20datastore","name":"API: datastore","color":"c0c0c0","default":false},{"id":526606723,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/triaged%20for%20GA","name":"triaged for GA","color":"FFFFFF","default":false},{"id":144595208,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/labels/Type:%20Question","name":"Type: Question","color":"8bc34a","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2016-10-31T15:34:19Z","updated_at":"2017-03-10T18:40:40Z","closed_at":null,"body":"The `Key.toUrlSafe()` returns a URL encoded (similar to `URLEncoder.encode`) version of the key like the one below: \r\n\r\n`partition_id+%7B%0A++project_id%3A+%22my-project%22%0A++namespace_id%3A+%22MyNamespace%22%0A%7D%0Apath+%7B%0A++kind%3A+%22MyEntity%22%0A++name%3A+%22MyKey%22%0A%7D%0A`\r\n\r\nThe Google Cloud Datastore Console displays a Base64 encoded version of the key, which looks something like - \r\n\r\n`agVoZWxsb3IPCxIHQWNjb3VudBiZiwIM`\r\n\r\nThe Console allows filtering on key by URL-safe key, which works fine if I use the URL-safe value displayed by the GCD Console, but does not work when using the value returned from `Key.toUrlSafe()`. \r\n\r\nThe Console Documentation states that - \r\n\r\n> **URL-safe key**\r\n> \r\n> This is a base64-encoded, serialized version of your entity key. **The encoding method is available in any Cloud Datastore client library**\r\n> \r\n> Example: agVoZWxsb3IPCxIHQWNjb3VudBiZiwIM\r\n\r\nSo, the client libraries are expected to match with the Base64 version? Nonetheless, it would be nice to have the client libraries and Console in sync to help with crosschecking/debugging purposes. \r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/comments/285750016","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-java/issues/1357#issuecomment-285750016","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-java/issues/1357","id":285750016,"user":{"login":"lesv","id":1136014,"avatar_url":"https://avatars1.githubusercontent.com/u/1136014?v=3","gravatar_id":"","url":"https://api.github.com/users/lesv","html_url":"https://github.com/lesv","followers_url":"https://api.github.com/users/lesv/followers","following_url":"https://api.github.com/users/lesv/following{/other_user}","gists_url":"https://api.github.com/users/lesv/gists{/gist_id}","starred_url":"https://api.github.com/users/lesv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesv/subscriptions","organizations_url":"https://api.github.com/users/lesv/orgs","repos_url":"https://api.github.com/users/lesv/repos","events_url":"https://api.github.com/users/lesv/events{/privacy}","received_events_url":"https://api.github.com/users/lesv/received_events","type":"User","site_admin":false},"created_at":"2017-03-10T18:40:40Z","updated_at":"2017-03-10T18:40:40Z","body":"There has been some offline discussion and it doesn't seem like this can be fixed for GA, and might not be able to be fixed at all."}}
{"actor":{"display_login":"lesv"}}