{"action":"created","issue":{"url":"https://api.github.com/repos/radex/SwiftyUserDefaults/issues/67","repository_url":"https://api.github.com/repos/radex/SwiftyUserDefaults","labels_url":"https://api.github.com/repos/radex/SwiftyUserDefaults/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/radex/SwiftyUserDefaults/issues/67/comments","events_url":"https://api.github.com/repos/radex/SwiftyUserDefaults/issues/67/events","html_url":"https://github.com/radex/SwiftyUserDefaults/pull/67","id":131811750,"number":67,"title":"Observe value changes","user":{"login":"toshi0383","id":6007952,"avatar_url":"https://avatars.githubusercontent.com/u/6007952?v=3","gravatar_id":"","url":"https://api.github.com/users/toshi0383","html_url":"https://github.com/toshi0383","followers_url":"https://api.github.com/users/toshi0383/followers","following_url":"https://api.github.com/users/toshi0383/following{/other_user}","gists_url":"https://api.github.com/users/toshi0383/gists{/gist_id}","starred_url":"https://api.github.com/users/toshi0383/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toshi0383/subscriptions","organizations_url":"https://api.github.com/users/toshi0383/orgs","repos_url":"https://api.github.com/users/toshi0383/repos","events_url":"https://api.github.com/users/toshi0383/events{/privacy}","received_events_url":"https://api.github.com/users/toshi0383/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-06T03:04:37Z","updated_at":"2016-03-02T12:01:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/radex/SwiftyUserDefaults/pulls/67","html_url":"https://github.com/radex/SwiftyUserDefaults/pull/67","diff_url":"https://github.com/radex/SwiftyUserDefaults/pull/67.diff","patch_url":"https://github.com/radex/SwiftyUserDefaults/pull/67.patch"},"body":"Just tried out KVO, and actually worked.\r\nI'm not sure if I manage the `handler`s right."},"comment":{"url":"https://api.github.com/repos/radex/SwiftyUserDefaults/issues/comments/191211601","html_url":"https://github.com/radex/SwiftyUserDefaults/pull/67#issuecomment-191211601","issue_url":"https://api.github.com/repos/radex/SwiftyUserDefaults/issues/67","id":191211601,"user":{"login":"toshi0383","id":6007952,"avatar_url":"https://avatars.githubusercontent.com/u/6007952?v=3","gravatar_id":"","url":"https://api.github.com/users/toshi0383","html_url":"https://github.com/toshi0383","followers_url":"https://api.github.com/users/toshi0383/followers","following_url":"https://api.github.com/users/toshi0383/following{/other_user}","gists_url":"https://api.github.com/users/toshi0383/gists{/gist_id}","starred_url":"https://api.github.com/users/toshi0383/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toshi0383/subscriptions","organizations_url":"https://api.github.com/users/toshi0383/orgs","repos_url":"https://api.github.com/users/toshi0383/repos","events_url":"https://api.github.com/users/toshi0383/events{/privacy}","received_events_url":"https://api.github.com/users/toshi0383/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T12:01:25Z","updated_at":"2016-03-02T12:01:25Z","body":"Thanks for reviewing !\r\n\r\nBlockDisposable is kindof [copied from ReactiveKit](https://github.com/ReactiveKit/ReactiveKit/blob/3940fb043e52c46a751e8bfa4f215d941828bc59/ReactiveKit/Disposables/BlockDisposable.swift). I just wanted the handlers to be disposable, so this library doesn't waste any memory.\r\nRecursiveLock is also from ReactiveKit, and I use it to make sure the handler registration is thread-safe.\r\n\r\n`observeValueForKeyPath` is plain KVO delegate. The first two `observe` methods are the public APIs for users (of this library). Users can observe key-value changes using either plain String or DefaultsKey<T>."}}