{"id":1283,"date":"2010-05-21T16:41:00","date_gmt":"2010-05-21T16:41:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/odatateam\/2010\/05\/21\/using-restricted-characters-in-data-service-keys\/"},"modified":"2010-05-21T16:41:00","modified_gmt":"2010-05-21T16:41:00","slug":"using-restricted-characters-in-data-service-keys","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/odata\/using-restricted-characters-in-data-service-keys\/","title":{"rendered":"Using Restricted Characters in Data Service Keys"},"content":{"rendered":"<p>If your Data Service includes entities with a string key, you can run into problems if the keys themselves contain certain restricted characters. <\/p>\n<p>For example OData has this <a href=\"https:\/\/www.odata.org\/developers\/protocols\/uri-conventions\"><span style=\"color: #777777\">uri convention<\/span><\/a> for identifying entities:<\/p>\n<p><strong>~\/Feed(&#8216;key&#8217;)<\/strong><\/p>\n<p>So if the &#8216;key&#8217; contains certain characters it can confuse Uri parsing and processing.<\/p>\n<p>Thankfully though <a href=\"http:\/\/blogs.msdn.com\/peter_qian\"><span style=\"color: #777777\">Peter Qian<\/span><\/a>, a developer on the Data Services team, has put together a <span style=\"color: #777777\"><a href=\"http:\/\/blogs.msdn.com\/b\/peter_qian\/archive\/2010\/05\/25\/using-wcf-data-service-with-restricted-characrters-as-keys.aspx\">very nice post<\/a><\/span> that covers a series of workarounds for the problems you might encounter.<\/p>\n<p>Enjoy.<\/p>\n<p><a href=\"https:\/\/twitter.com\/adjames\"><strong><span style=\"color: #777777\">Alex James<\/span><\/strong><\/a> <br \/>Program Manager <br \/>Data Services Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If your Data Service includes entities with a string key, you can run into problems if the keys themselves contain certain restricted characters. For example OData has this uri convention for identifying entities: ~\/Feed(&#8216;key&#8217;) So if the &#8216;key&#8217; contains certain characters it can confuse Uri parsing and processing. Thankfully though Peter Qian, a developer on [&hellip;]<\/p>\n","protected":false},"author":512,"featured_media":3253,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[48,73,89],"class_list":["post-1283","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-odata","tag-odata","tag-tips","tag-workarounds"],"acf":[],"blog_post_summary":"<p>If your Data Service includes entities with a string key, you can run into problems if the keys themselves contain certain restricted characters. For example OData has this uri convention for identifying entities: ~\/Feed(&#8216;key&#8217;) So if the &#8216;key&#8217; contains certain characters it can confuse Uri parsing and processing. Thankfully though Peter Qian, a developer on [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/posts\/1283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/users\/512"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/comments?post=1283"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/posts\/1283\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/media\/3253"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/media?parent=1283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/categories?post=1283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/odata\/wp-json\/wp\/v2\/tags?post=1283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}