{"action":"created","issue":{"url":"https://api.github.com/repos/mdedetrich/scala-json-ast/issues/10","repository_url":"https://api.github.com/repos/mdedetrich/scala-json-ast","labels_url":"https://api.github.com/repos/mdedetrich/scala-json-ast/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/mdedetrich/scala-json-ast/issues/10/comments","events_url":"https://api.github.com/repos/mdedetrich/scala-json-ast/issues/10/events","html_url":"https://github.com/mdedetrich/scala-json-ast/issues/10","id":193104985,"number":10,"title":"unsafe.JObject equality","user":{"login":"dwijnand","id":344610,"avatar_url":"https://avatars.githubusercontent.com/u/344610?v=3","gravatar_id":"","url":"https://api.github.com/users/dwijnand","html_url":"https://github.com/dwijnand","followers_url":"https://api.github.com/users/dwijnand/followers","following_url":"https://api.github.com/users/dwijnand/following{/other_user}","gists_url":"https://api.github.com/users/dwijnand/gists{/gist_id}","starred_url":"https://api.github.com/users/dwijnand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwijnand/subscriptions","organizations_url":"https://api.github.com/users/dwijnand/orgs","repos_url":"https://api.github.com/users/dwijnand/repos","events_url":"https://api.github.com/users/dwijnand/events{/privacy}","received_events_url":"https://api.github.com/users/dwijnand/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-02T12:27:10Z","updated_at":"2016-12-02T15:13:10Z","closed_at":null,"body":"If this is intended it should be declared loudly, because personally I find it very unintuitive in Scala:\r\n\r\n```scala\r\nscala> import scala.json.ast._\r\nimport scala.json.ast._\r\n\r\nscala> unsafe.JObject() == unsafe.JObject()\r\nres0: Boolean = false\r\n```"},"comment":{"url":"https://api.github.com/repos/mdedetrich/scala-json-ast/issues/comments/264476421","html_url":"https://github.com/mdedetrich/scala-json-ast/issues/10#issuecomment-264476421","issue_url":"https://api.github.com/repos/mdedetrich/scala-json-ast/issues/10","id":264476421,"user":{"login":"mdedetrich","id":2337269,"avatar_url":"https://avatars.githubusercontent.com/u/2337269?v=3","gravatar_id":"","url":"https://api.github.com/users/mdedetrich","html_url":"https://github.com/mdedetrich","followers_url":"https://api.github.com/users/mdedetrich/followers","following_url":"https://api.github.com/users/mdedetrich/following{/other_user}","gists_url":"https://api.github.com/users/mdedetrich/gists{/gist_id}","starred_url":"https://api.github.com/users/mdedetrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdedetrich/subscriptions","organizations_url":"https://api.github.com/users/mdedetrich/orgs","repos_url":"https://api.github.com/users/mdedetrich/repos","events_url":"https://api.github.com/users/mdedetrich/events{/privacy}","received_events_url":"https://api.github.com/users/mdedetrich/received_events","type":"User","site_admin":false},"created_at":"2016-12-02T15:13:10Z","updated_at":"2016-12-02T15:13:10Z","body":"> I'm not too wild about \"unsafe\" also being unsafe to use == on. Is there some way for == to just be a more expensive, but still accurate, operation in the unsafe AST?\r\n\r\nThere is but it then means you can't do reference equality anymore, and one of the design goals of unsafe is to be fast by default.\r\n\r\nObviously you can do structural equality with the Array, there is java.util.Arrays.equals which will do a proper comparison that 2 arrays are equal. It does get a bit more complicated with `JObject` though since you have to do this logic recursively. I am thinking that it may make sense to provide a helper method to do this, I had to do it in tests to verify correctness anyways"}}
{"actor":{"display_login":"mdedetrich"}}