{"action":"created","issue":{"url":"https://api.github.com/repos/playframework/playframework/issues/3896","labels_url":"https://api.github.com/repos/playframework/playframework/issues/3896/labels{/name}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/3896/comments","events_url":"https://api.github.com/repos/playframework/playframework/issues/3896/events","html_url":"https://github.com/playframework/playframework/pull/3896","id":56627695,"number":3896,"title":"JsUndefined should not be a JsValue","user":{"login":"gmethvin","id":171663,"avatar_url":"https://avatars.githubusercontent.com/u/171663?v=3","gravatar_id":"","url":"https://api.github.com/users/gmethvin","html_url":"https://github.com/gmethvin","followers_url":"https://api.github.com/users/gmethvin/followers","following_url":"https://api.github.com/users/gmethvin/following{/other_user}","gists_url":"https://api.github.com/users/gmethvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gmethvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmethvin/subscriptions","organizations_url":"https://api.github.com/users/gmethvin/orgs","repos_url":"https://api.github.com/users/gmethvin/repos","events_url":"https://api.github.com/users/gmethvin/events{/privacy}","received_events_url":"https://api.github.com/users/gmethvin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-02-05T04:58:43Z","updated_at":"2015-02-09T09:15:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/playframework/playframework/pulls/3896","html_url":"https://github.com/playframework/playframework/pull/3896","diff_url":"https://github.com/playframework/playframework/pull/3896.diff","patch_url":"https://github.com/playframework/playframework/pull/3896.patch"},"body":"After the discussion on #3888 it occurred to me that it should be possible to separate `JsValue` from the type used for traversing paths (which requires `JsUndefined`). I created the `JsLookup` specifically for representing the value at a particular JSON path. Many of the other cases where `JsUndefined` might otherwise be used already return `JsResult` and use `JsError` for when a path does not exist.\r\n\r\nThere are probably other ways of handling the type for doing traversal (implicit conversions from JsValue?) but I wanted to put this out there first as one possible solution."},"comment":{"url":"https://api.github.com/repos/playframework/playframework/issues/comments/73477692","html_url":"https://github.com/playframework/playframework/pull/3896#issuecomment-73477692","issue_url":"https://api.github.com/repos/playframework/playframework/issues/3896","id":73477692,"user":{"login":"gmethvin","id":171663,"avatar_url":"https://avatars.githubusercontent.com/u/171663?v=3","gravatar_id":"","url":"https://api.github.com/users/gmethvin","html_url":"https://github.com/gmethvin","followers_url":"https://api.github.com/users/gmethvin/followers","following_url":"https://api.github.com/users/gmethvin/following{/other_user}","gists_url":"https://api.github.com/users/gmethvin/gists{/gist_id}","starred_url":"https://api.github.com/users/gmethvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmethvin/subscriptions","organizations_url":"https://api.github.com/users/gmethvin/orgs","repos_url":"https://api.github.com/users/gmethvin/repos","events_url":"https://api.github.com/users/gmethvin/events{/privacy}","received_events_url":"https://api.github.com/users/gmethvin/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T09:15:22Z","updated_at":"2015-02-09T09:15:22Z","body":"Switching to json4s is definitely something we should discuss in more detail (maybe create another issue?), but I'm not sure I'm convinced their way of modeling the AST is ideal. I like our approach, at least after this is merged, of having a 1-1 mapping of Scala types to JSON types.\r\n\r\nEither way, here we at least separate the AST from the DSL for querying JSON, which is a step in the right direction if we do want to switch to json4s later."}}