{"action":"created","comment":{"url":"https://api.github.com/repos/metosin/muuntaja/pulls/comments/94016321","pull_request_review_id":14546201,"id":94016321,"diff_hunk":"@@ -0,0 +1,97 @@\n+(ns muuntaja.jackson-test\n+  (:require [clojure.test :refer :all]\n+            [muuntaja.jackson :as jackson]\n+            [cheshire.core :as cheshire]\n+            [cheshire.generate]\n+            [cheshire.generate :as generate])\n+  (:import (java.util UUID Date)\n+           (java.sql Timestamp)\n+           (com.fasterxml.jackson.core JsonGenerator)))\n+\n+(deftest options-tests\n+  (is (= {\"hello\" \"world\"}\n+         (jackson/from-json\n+           (jackson/to-json {\"hello\" \"world\"}))))\n+  #_(is (= {:hello \"world\"}\n+           (jackson/from-json\n+             (jackson/to-json {\"hello\" \"world\"})\n+             {:key-fn true}))))\n+\n+(deftest roundrobin-tests\n+  (let [data {:numbers {:integer (int 1)\n+                        :long (long 2)\n+                        :double (double 1.2)\n+                        :float (float 3.14)\n+                        :big-integer (biginteger 3)\n+                        :big-decimal (bigdec 4)\n+                        :ratio 3/4\n+                        :short (short 5)\n+                        :byte (byte 6)\n+                        :big-int (bigint 7)}\n+              :boolean true\n+              :string \"string\"\n+              :character \\c\n+              :keyword :keyword\n+              :set #{1 2 3}\n+              :bytes (.getBytes \"bytes\")\n+              :uuid (UUID/fromString \"fbe5a1e8-6c91-42f6-8147-6cde3188fd25\")\n+              :symbol 'symbol\n+              :date (Date. 0)\n+              :timestamp (Timestamp. 0)}\n+        expected {:numbers {:integer 1\n+                            :long 2\n+                            :double 1.2\n+                            :float 3.14\n+                            :big-integer 3\n+                            :big-decimal 4\n+                            :ratio 0.75\n+                            :short 5\n+                            :byte 6\n+                            :big-int 7}\n+                  :boolean true\n+                  :string \"string\"\n+                  :character \"c\"\n+                  :keyword \"keyword\"\n+                  :set [1 3 2]\n+                  :bytes \"Ynl0ZXM=\"\n+                  :uuid \"fbe5a1e8-6c91-42f6-8147-6cde3188fd25\"\n+                  :symbol \"symbol\"\n+                  :date \"1970-01-01T00:00:00Z\"\n+                  :timestamp \"1970-01-01T00:00:00Z\"}]\n+\n+    (testing \"cheshire\"\n+      (is (= expected (cheshire/parse-string\n+                        (cheshire/generate-string data)\n+                        true))))\n+\n+    #_(testing \"jackson\"\n+        (is (= (cheshire/generate-string data)\n+               (jackson/to-json data)))","path":"test/muuntaja/jackson_test.clj","position":69,"original_position":69,"commit_id":"8ac619bbf0cc35428249214fd04f731cb3d46894","original_commit_id":"8ac619bbf0cc35428249214fd04f731cb3d46894","user":{"login":"ikitommi","id":567532,"avatar_url":"https://avatars.githubusercontent.com/u/567532?v=3","gravatar_id":"","url":"https://api.github.com/users/ikitommi","html_url":"https://github.com/ikitommi","followers_url":"https://api.github.com/users/ikitommi/followers","following_url":"https://api.github.com/users/ikitommi/following{/other_user}","gists_url":"https://api.github.com/users/ikitommi/gists{/gist_id}","starred_url":"https://api.github.com/users/ikitommi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikitommi/subscriptions","organizations_url":"https://api.github.com/users/ikitommi/orgs","repos_url":"https://api.github.com/users/ikitommi/repos","events_url":"https://api.github.com/users/ikitommi/events{/privacy}","received_events_url":"https://api.github.com/users/ikitommi/received_events","type":"User","site_admin":false},"body":"Good point. Comparing JSON strings is a bad idea. I had no plans to do more here, just committed my learning tests.","created_at":"2016-12-28T10:18:50Z","updated_at":"2016-12-28T10:18:50Z","html_url":"https://github.com/metosin/muuntaja/pull/20#discussion_r94016321","pull_request_url":"https://api.github.com/repos/metosin/muuntaja/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/metosin/muuntaja/pulls/comments/94016321"},"html":{"href":"https://github.com/metosin/muuntaja/pull/20#discussion_r94016321"},"pull_request":{"href":"https://api.github.com/repos/metosin/muuntaja/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/metosin/muuntaja/pulls/20","id":98997116,"html_url":"https://github.com/metosin/muuntaja/pull/20","diff_url":"https://github.com/metosin/muuntaja/pull/20.diff","patch_url":"https://github.com/metosin/muuntaja/pull/20.patch","issue_url":"https://api.github.com/repos/metosin/muuntaja/issues/20","number":20,"state":"open","locked":false,"title":"Jackson-based JSON encoding and decoding (WIP)","user":{"login":"miikka","id":34607,"avatar_url":"https://avatars.githubusercontent.com/u/34607?v=3","gravatar_id":"","url":"https://api.github.com/users/miikka","html_url":"https://github.com/miikka","followers_url":"https://api.github.com/users/miikka/followers","following_url":"https://api.github.com/users/miikka/following{/other_user}","gists_url":"https://api.github.com/users/miikka/gists{/gist_id}","starred_url":"https://api.github.com/users/miikka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miikka/subscriptions","organizations_url":"https://api.github.com/users/miikka/orgs","repos_url":"https://api.github.com/users/miikka/repos","events_url":"https://api.github.com/users/miikka/events{/privacy}","received_events_url":"https://api.github.com/users/miikka/received_events","type":"User","site_admin":false},"body":"This may or may not be a bit faster than Cheshire. At least it's not too much code.\r\n\r\n* How to deal with custom types and other configuration?\r\n* Needs tests.\r\n* Needs proper benchmarking.\r\n\r\nThe current `muuntaja.json` should be probably thrown away and this should replace it.","created_at":"2016-12-21T20:12:33Z","updated_at":"2016-12-28T10:18:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"154a32cdfe1b76febfee0f76ee8a825b73284ff7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/metosin/muuntaja/pulls/20/commits","review_comments_url":"https://api.github.com/repos/metosin/muuntaja/pulls/20/comments","review_comment_url":"https://api.github.com/repos/metosin/muuntaja/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metosin/muuntaja/issues/20/comments","statuses_url":"https://api.github.com/repos/metosin/muuntaja/statuses/8ac619bbf0cc35428249214fd04f731cb3d46894","head":{"label":"metosin:jackson","ref":"jackson","sha":"8ac619bbf0cc35428249214fd04f731cb3d46894","user":{"login":"metosin","id":1569418,"avatar_url":"https://avatars.githubusercontent.com/u/1569418?v=3","gravatar_id":"","url":"https://api.github.com/users/metosin","html_url":"https://github.com/metosin","followers_url":"https://api.github.com/users/metosin/followers","following_url":"https://api.github.com/users/metosin/following{/other_user}","gists_url":"https://api.github.com/users/metosin/gists{/gist_id}","starred_url":"https://api.github.com/users/metosin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metosin/subscriptions","organizations_url":"https://api.github.com/users/metosin/orgs","repos_url":"https://api.github.com/users/metosin/repos","events_url":"https://api.github.com/users/metosin/events{/privacy}","received_events_url":"https://api.github.com/users/metosin/received_events","type":"Organization","site_admin":false},"repo":{"id":65613306,"name":"muuntaja","full_name":"metosin/muuntaja","owner":{"login":"metosin","id":1569418,"avatar_url":"https://avatars.githubusercontent.com/u/1569418?v=3","gravatar_id":"","url":"https://api.github.com/users/metosin","html_url":"https://github.com/metosin","followers_url":"https://api.github.com/users/metosin/followers","following_url":"https://api.github.com/users/metosin/following{/other_user}","gists_url":"https://api.github.com/users/metosin/gists{/gist_id}","starred_url":"https://api.github.com/users/metosin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metosin/subscriptions","organizations_url":"https://api.github.com/users/metosin/orgs","repos_url":"https://api.github.com/users/metosin/repos","events_url":"https://api.github.com/users/metosin/events{/privacy}","received_events_url":"https://api.github.com/users/metosin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metosin/muuntaja","description":"Clojure library for fast http api format negotiation, encoding and decoding.","fork":false,"url":"https://api.github.com/repos/metosin/muuntaja","forks_url":"https://api.github.com/repos/metosin/muuntaja/forks","keys_url":"https://api.github.com/repos/metosin/muuntaja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metosin/muuntaja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metosin/muuntaja/teams","hooks_url":"https://api.github.com/repos/metosin/muuntaja/hooks","issue_events_url":"https://api.github.com/repos/metosin/muuntaja/issues/events{/number}","events_url":"https://api.github.com/repos/metosin/muuntaja/events","assignees_url":"https://api.github.com/repos/metosin/muuntaja/assignees{/user}","branches_url":"https://api.github.com/repos/metosin/muuntaja/branches{/branch}","tags_url":"https://api.github.com/repos/metosin/muuntaja/tags","blobs_url":"https://api.github.com/repos/metosin/muuntaja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metosin/muuntaja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metosin/muuntaja/git/refs{/sha}","trees_url":"https://api.github.com/repos/metosin/muuntaja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metosin/muuntaja/statuses/{sha}","languages_url":"https://api.github.com/repos/metosin/muuntaja/languages","stargazers_url":"https://api.github.com/repos/metosin/muuntaja/stargazers","contributors_url":"https://api.github.com/repos/metosin/muuntaja/contributors","subscribers_url":"https://api.github.com/repos/metosin/muuntaja/subscribers","subscription_url":"https://api.github.com/repos/metosin/muuntaja/subscription","commits_url":"https://api.github.com/repos/metosin/muuntaja/commits{/sha}","git_commits_url":"https://api.github.com/repos/metosin/muuntaja/git/commits{/sha}","comments_url":"https://api.github.com/repos/metosin/muuntaja/comments{/number}","issue_comment_url":"https://api.github.com/repos/metosin/muuntaja/issues/comments{/number}","contents_url":"https://api.github.com/repos/metosin/muuntaja/contents/{+path}","compare_url":"https://api.github.com/repos/metosin/muuntaja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metosin/muuntaja/merges","archive_url":"https://api.github.com/repos/metosin/muuntaja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metosin/muuntaja/downloads","issues_url":"https://api.github.com/repos/metosin/muuntaja/issues{/number}","pulls_url":"https://api.github.com/repos/metosin/muuntaja/pulls{/number}","milestones_url":"https://api.github.com/repos/metosin/muuntaja/milestones{/number}","notifications_url":"https://api.github.com/repos/metosin/muuntaja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metosin/muuntaja/labels{/name}","releases_url":"https://api.github.com/repos/metosin/muuntaja/releases{/id}","deployments_url":"https://api.github.com/repos/metosin/muuntaja/deployments","created_at":"2016-08-13T11:01:21Z","updated_at":"2016-12-16T13:36:16Z","pushed_at":"2016-12-28T09:39:37Z","git_url":"git://github.com/metosin/muuntaja.git","ssh_url":"git@github.com:metosin/muuntaja.git","clone_url":"https://github.com/metosin/muuntaja.git","svn_url":"https://github.com/metosin/muuntaja","homepage":"","size":467,"stargazers_count":14,"watchers_count":14,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":14,"default_branch":"master"}},"base":{"label":"metosin:master","ref":"master","sha":"361f92cbeea87b2b3883f4d98f9f099a30e42b3a","user":{"login":"metosin","id":1569418,"avatar_url":"https://avatars.githubusercontent.com/u/1569418?v=3","gravatar_id":"","url":"https://api.github.com/users/metosin","html_url":"https://github.com/metosin","followers_url":"https://api.github.com/users/metosin/followers","following_url":"https://api.github.com/users/metosin/following{/other_user}","gists_url":"https://api.github.com/users/metosin/gists{/gist_id}","starred_url":"https://api.github.com/users/metosin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metosin/subscriptions","organizations_url":"https://api.github.com/users/metosin/orgs","repos_url":"https://api.github.com/users/metosin/repos","events_url":"https://api.github.com/users/metosin/events{/privacy}","received_events_url":"https://api.github.com/users/metosin/received_events","type":"Organization","site_admin":false},"repo":{"id":65613306,"name":"muuntaja","full_name":"metosin/muuntaja","owner":{"login":"metosin","id":1569418,"avatar_url":"https://avatars.githubusercontent.com/u/1569418?v=3","gravatar_id":"","url":"https://api.github.com/users/metosin","html_url":"https://github.com/metosin","followers_url":"https://api.github.com/users/metosin/followers","following_url":"https://api.github.com/users/metosin/following{/other_user}","gists_url":"https://api.github.com/users/metosin/gists{/gist_id}","starred_url":"https://api.github.com/users/metosin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metosin/subscriptions","organizations_url":"https://api.github.com/users/metosin/orgs","repos_url":"https://api.github.com/users/metosin/repos","events_url":"https://api.github.com/users/metosin/events{/privacy}","received_events_url":"https://api.github.com/users/metosin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metosin/muuntaja","description":"Clojure library for fast http api format negotiation, encoding and decoding.","fork":false,"url":"https://api.github.com/repos/metosin/muuntaja","forks_url":"https://api.github.com/repos/metosin/muuntaja/forks","keys_url":"https://api.github.com/repos/metosin/muuntaja/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metosin/muuntaja/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metosin/muuntaja/teams","hooks_url":"https://api.github.com/repos/metosin/muuntaja/hooks","issue_events_url":"https://api.github.com/repos/metosin/muuntaja/issues/events{/number}","events_url":"https://api.github.com/repos/metosin/muuntaja/events","assignees_url":"https://api.github.com/repos/metosin/muuntaja/assignees{/user}","branches_url":"https://api.github.com/repos/metosin/muuntaja/branches{/branch}","tags_url":"https://api.github.com/repos/metosin/muuntaja/tags","blobs_url":"https://api.github.com/repos/metosin/muuntaja/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metosin/muuntaja/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metosin/muuntaja/git/refs{/sha}","trees_url":"https://api.github.com/repos/metosin/muuntaja/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metosin/muuntaja/statuses/{sha}","languages_url":"https://api.github.com/repos/metosin/muuntaja/languages","stargazers_url":"https://api.github.com/repos/metosin/muuntaja/stargazers","contributors_url":"https://api.github.com/repos/metosin/muuntaja/contributors","subscribers_url":"https://api.github.com/repos/metosin/muuntaja/subscribers","subscription_url":"https://api.github.com/repos/metosin/muuntaja/subscription","commits_url":"https://api.github.com/repos/metosin/muuntaja/commits{/sha}","git_commits_url":"https://api.github.com/repos/metosin/muuntaja/git/commits{/sha}","comments_url":"https://api.github.com/repos/metosin/muuntaja/comments{/number}","issue_comment_url":"https://api.github.com/repos/metosin/muuntaja/issues/comments{/number}","contents_url":"https://api.github.com/repos/metosin/muuntaja/contents/{+path}","compare_url":"https://api.github.com/repos/metosin/muuntaja/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metosin/muuntaja/merges","archive_url":"https://api.github.com/repos/metosin/muuntaja/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metosin/muuntaja/downloads","issues_url":"https://api.github.com/repos/metosin/muuntaja/issues{/number}","pulls_url":"https://api.github.com/repos/metosin/muuntaja/pulls{/number}","milestones_url":"https://api.github.com/repos/metosin/muuntaja/milestones{/number}","notifications_url":"https://api.github.com/repos/metosin/muuntaja/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metosin/muuntaja/labels{/name}","releases_url":"https://api.github.com/repos/metosin/muuntaja/releases{/id}","deployments_url":"https://api.github.com/repos/metosin/muuntaja/deployments","created_at":"2016-08-13T11:01:21Z","updated_at":"2016-12-16T13:36:16Z","pushed_at":"2016-12-28T09:39:37Z","git_url":"git://github.com/metosin/muuntaja.git","ssh_url":"git@github.com:metosin/muuntaja.git","clone_url":"https://github.com/metosin/muuntaja.git","svn_url":"https://github.com/metosin/muuntaja","homepage":"","size":467,"stargazers_count":14,"watchers_count":14,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metosin/muuntaja/pulls/20"},"html":{"href":"https://github.com/metosin/muuntaja/pull/20"},"issue":{"href":"https://api.github.com/repos/metosin/muuntaja/issues/20"},"comments":{"href":"https://api.github.com/repos/metosin/muuntaja/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/metosin/muuntaja/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/metosin/muuntaja/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metosin/muuntaja/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/metosin/muuntaja/statuses/8ac619bbf0cc35428249214fd04f731cb3d46894"}}}}
{"actor":{"display_login":"ikitommi"}}