{"action":"created","issue":{"url":"https://api.github.com/repos/jayway/JsonPath/issues/171","labels_url":"https://api.github.com/repos/jayway/JsonPath/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/jayway/JsonPath/issues/171/comments","events_url":"https://api.github.com/repos/jayway/JsonPath/issues/171/events","html_url":"https://github.com/jayway/JsonPath/issues/171","id":122001636,"number":171,"title":"Some methods (i.e. DocumentContext's set) fail when JSON name has ' in it","user":{"login":"oleg-gr","id":3584701,"avatar_url":"https://avatars.githubusercontent.com/u/3584701?v=3","gravatar_id":"","url":"https://api.github.com/users/oleg-gr","html_url":"https://github.com/oleg-gr","followers_url":"https://api.github.com/users/oleg-gr/followers","following_url":"https://api.github.com/users/oleg-gr/following{/other_user}","gists_url":"https://api.github.com/users/oleg-gr/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg-gr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg-gr/subscriptions","organizations_url":"https://api.github.com/users/oleg-gr/orgs","repos_url":"https://api.github.com/users/oleg-gr/repos","events_url":"https://api.github.com/users/oleg-gr/events{/privacy}","received_events_url":"https://api.github.com/users/oleg-gr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-14T09:11:09Z","updated_at":"2015-12-15T00:57:31Z","closed_at":"2015-12-14T17:33:41Z","body":"Given this JSON object\r\n```\r\n{\r\n  \"can delete\": \"this\",\r\n  \"can't delete\": \"this\"\r\n}\r\n``` \r\nTrying to run\r\n```\r\nConfiguration configuration = Configuration.defaultConfiguration().jsonProvider(new JacksonJsonNodeJsonProvider()).mappingProvider(new JacksonMappingProvider()).addOptions(Option.AS_PATH_LIST);\r\nDocumentContext context = JsonPath.parse(JSON_NODE, configuration);\r\ncontext.set(\"$.['can delete']\", null);\r\ncontext.set(\"$.['can't delete']\", null); # this will fail\r\n```\r\nThis is a simplified example but `'` is valid in the name according to JSON standard. More over, running\r\n```\r\ncontext.read(\"$..*\")\r\n```\r\nwill return\r\n```\r\n[\"$.['can delete']\", \"$.['can't delete']\"]\r\n```\r\nand will cause issues, when trying to use the second value, e.g. `context.set(paths[1], null);` where paths is an array of paths gotten from `context.read(\"$..*\")`"},"comment":{"url":"https://api.github.com/repos/jayway/JsonPath/issues/comments/164607734","html_url":"https://github.com/jayway/JsonPath/issues/171#issuecomment-164607734","issue_url":"https://api.github.com/repos/jayway/JsonPath/issues/171","id":164607734,"user":{"login":"oleg-gr","id":3584701,"avatar_url":"https://avatars.githubusercontent.com/u/3584701?v=3","gravatar_id":"","url":"https://api.github.com/users/oleg-gr","html_url":"https://github.com/oleg-gr","followers_url":"https://api.github.com/users/oleg-gr/followers","following_url":"https://api.github.com/users/oleg-gr/following{/other_user}","gists_url":"https://api.github.com/users/oleg-gr/gists{/gist_id}","starred_url":"https://api.github.com/users/oleg-gr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oleg-gr/subscriptions","organizations_url":"https://api.github.com/users/oleg-gr/orgs","repos_url":"https://api.github.com/users/oleg-gr/repos","events_url":"https://api.github.com/users/oleg-gr/events{/privacy}","received_events_url":"https://api.github.com/users/oleg-gr/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T00:57:31Z","updated_at":"2015-12-15T00:57:31Z","body":"@kallestenflo thank you. Any plan to change paths returned by `context.read(\"$..*\")` containing `'`? If I am going to use a path returned by context.read containing `\"$.['can't delete']\"` I will have to manually escape the `'` in the middle only"}}