{"action":"created","comment":{"url":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/comments/105922872","pull_request_review_id":26822910,"id":105922872,"diff_hunk":"@@ -440,12 +466,21 @@ var Serializer = (function () {\n       case 'Variable':\n         return expr.toNT()\n       case 'Literal':\n+        var val = expr.value.toString() // should be a string already\n         if (expr.datatype && this.flags.indexOf('x') < 0) { // Supress native numbers\n           switch (expr.datatype.uri) {\n+\n             case 'http://www.w3.org/2001/XMLSchema#integer':\n-              return expr.value.toString()\n+              return val\n+\n+            case 'http://www.w3.org/2001/XMLSchema#decimal': // In urtle must have dot\n+              if (val.indexOf('.')  < 0) val += '.0'\n+              return val\n \n-            // case 'http://www.w3.org/2001/XMLSchema#double': // Must force use of 'e'\n+            case 'http://www.w3.org/2001/XMLSchema#double': // Must force use of 'e'","path":"src/serializer.js","position":212,"original_position":212,"commit_id":"50d4a83c2d2d0b7aedebd2cbcfc1b4f22c9e6688","original_commit_id":"bd8e4fe5f43076b89e6d9d0ba21e835427228429","user":{"login":"dan-f","id":2146312,"avatar_url":"https://avatars0.githubusercontent.com/u/2146312?v=3","gravatar_id":"","url":"https://api.github.com/users/dan-f","html_url":"https://github.com/dan-f","followers_url":"https://api.github.com/users/dan-f/followers","following_url":"https://api.github.com/users/dan-f/following{/other_user}","gists_url":"https://api.github.com/users/dan-f/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-f/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-f/subscriptions","organizations_url":"https://api.github.com/users/dan-f/orgs","repos_url":"https://api.github.com/users/dan-f/repos","events_url":"https://api.github.com/users/dan-f/events{/privacy}","received_events_url":"https://api.github.com/users/dan-f/received_events","type":"User","site_admin":false},"body":"Could be useful to have a `val` of, e.g. 10 to see it generate `10.0e0`.","created_at":"2017-03-14T14:30:25Z","updated_at":"2017-03-14T14:30:25Z","html_url":"https://github.com/linkeddata/rdflib.js/pull/172#discussion_r105922872","pull_request_url":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/172","_links":{"self":{"href":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/comments/105922872"},"html":{"href":"https://github.com/linkeddata/rdflib.js/pull/172#discussion_r105922872"},"pull_request":{"href":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/172"}}},"pull_request":{"url":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/172","id":109600313,"html_url":"https://github.com/linkeddata/rdflib.js/pull/172","diff_url":"https://github.com/linkeddata/rdflib.js/pull/172.diff","patch_url":"https://github.com/linkeddata/rdflib.js/pull/172.patch","issue_url":"https://api.github.com/repos/linkeddata/rdflib.js/issues/172","number":172,"state":"open","locked":false,"title":"Timbl serializer: change to format","user":{"login":"timbl","id":1254848,"avatar_url":"https://avatars0.githubusercontent.com/u/1254848?v=3","gravatar_id":"","url":"https://api.github.com/users/timbl","html_url":"https://github.com/timbl","followers_url":"https://api.github.com/users/timbl/followers","following_url":"https://api.github.com/users/timbl/following{/other_user}","gists_url":"https://api.github.com/users/timbl/gists{/gist_id}","starred_url":"https://api.github.com/users/timbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timbl/subscriptions","organizations_url":"https://api.github.com/users/timbl/orgs","repos_url":"https://api.github.com/users/timbl/repos","events_url":"https://api.github.com/users/timbl/events{/privacy}","received_events_url":"https://api.github.com/users/timbl/received_events","type":"User","site_admin":false},"body":"This makes a number of changes to the way Turtle/N3 is serialized.\r\nWhen you upgrade, your datasets will go through a large change in their version control systems.\r\n\r\nStability of serialized format: (turtle and rdf/xml)\r\n- Sort the statements by order of subject, then predicate, then object \r\n- rdf:type at the top of the predicates \r\n\r\nReadability: (turtle only)\r\n- If everything fits put it on one line of 80 chars\r\n- Put predicate and object normally on same line\r\n- indenting\r\n- Use of default namespace so :this instead of <#this>\r\n- Use of turtle numeric literals like 23.6\r\n\r\nAdded a few tests for different structures and datatypes.\r\n","created_at":"2017-03-08T00:04:22Z","updated_at":"2017-03-14T14:30:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80292db6e648d3189d930ad994349c7e7d6adbc5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/172/commits","review_comments_url":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/172/comments","review_comment_url":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linkeddata/rdflib.js/issues/172/comments","statuses_url":"https://api.github.com/repos/linkeddata/rdflib.js/statuses/50d4a83c2d2d0b7aedebd2cbcfc1b4f22c9e6688","head":{"label":"linkeddata:timbl-serializer","ref":"timbl-serializer","sha":"50d4a83c2d2d0b7aedebd2cbcfc1b4f22c9e6688","user":{"login":"linkeddata","id":1261005,"avatar_url":"https://avatars1.githubusercontent.com/u/1261005?v=3","gravatar_id":"","url":"https://api.github.com/users/linkeddata","html_url":"https://github.com/linkeddata","followers_url":"https://api.github.com/users/linkeddata/followers","following_url":"https://api.github.com/users/linkeddata/following{/other_user}","gists_url":"https://api.github.com/users/linkeddata/gists{/gist_id}","starred_url":"https://api.github.com/users/linkeddata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkeddata/subscriptions","organizations_url":"https://api.github.com/users/linkeddata/orgs","repos_url":"https://api.github.com/users/linkeddata/repos","events_url":"https://api.github.com/users/linkeddata/events{/privacy}","received_events_url":"https://api.github.com/users/linkeddata/received_events","type":"Organization","site_admin":false},"repo":{"id":2976235,"name":"rdflib.js","full_name":"linkeddata/rdflib.js","owner":{"login":"linkeddata","id":1261005,"avatar_url":"https://avatars1.githubusercontent.com/u/1261005?v=3","gravatar_id":"","url":"https://api.github.com/users/linkeddata","html_url":"https://github.com/linkeddata","followers_url":"https://api.github.com/users/linkeddata/followers","following_url":"https://api.github.com/users/linkeddata/following{/other_user}","gists_url":"https://api.github.com/users/linkeddata/gists{/gist_id}","starred_url":"https://api.github.com/users/linkeddata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkeddata/subscriptions","organizations_url":"https://api.github.com/users/linkeddata/orgs","repos_url":"https://api.github.com/users/linkeddata/repos","events_url":"https://api.github.com/users/linkeddata/events{/privacy}","received_events_url":"https://api.github.com/users/linkeddata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkeddata/rdflib.js","description":"Linked Data API for JavaScript","fork":false,"url":"https://api.github.com/repos/linkeddata/rdflib.js","forks_url":"https://api.github.com/repos/linkeddata/rdflib.js/forks","keys_url":"https://api.github.com/repos/linkeddata/rdflib.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkeddata/rdflib.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkeddata/rdflib.js/teams","hooks_url":"https://api.github.com/repos/linkeddata/rdflib.js/hooks","issue_events_url":"https://api.github.com/repos/linkeddata/rdflib.js/issues/events{/number}","events_url":"https://api.github.com/repos/linkeddata/rdflib.js/events","assignees_url":"https://api.github.com/repos/linkeddata/rdflib.js/assignees{/user}","branches_url":"https://api.github.com/repos/linkeddata/rdflib.js/branches{/branch}","tags_url":"https://api.github.com/repos/linkeddata/rdflib.js/tags","blobs_url":"https://api.github.com/repos/linkeddata/rdflib.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkeddata/rdflib.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkeddata/rdflib.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkeddata/rdflib.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkeddata/rdflib.js/statuses/{sha}","languages_url":"https://api.github.com/repos/linkeddata/rdflib.js/languages","stargazers_url":"https://api.github.com/repos/linkeddata/rdflib.js/stargazers","contributors_url":"https://api.github.com/repos/linkeddata/rdflib.js/contributors","subscribers_url":"https://api.github.com/repos/linkeddata/rdflib.js/subscribers","subscription_url":"https://api.github.com/repos/linkeddata/rdflib.js/subscription","commits_url":"https://api.github.com/repos/linkeddata/rdflib.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkeddata/rdflib.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkeddata/rdflib.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkeddata/rdflib.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkeddata/rdflib.js/contents/{+path}","compare_url":"https://api.github.com/repos/linkeddata/rdflib.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkeddata/rdflib.js/merges","archive_url":"https://api.github.com/repos/linkeddata/rdflib.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkeddata/rdflib.js/downloads","issues_url":"https://api.github.com/repos/linkeddata/rdflib.js/issues{/number}","pulls_url":"https://api.github.com/repos/linkeddata/rdflib.js/pulls{/number}","milestones_url":"https://api.github.com/repos/linkeddata/rdflib.js/milestones{/number}","notifications_url":"https://api.github.com/repos/linkeddata/rdflib.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkeddata/rdflib.js/labels{/name}","releases_url":"https://api.github.com/repos/linkeddata/rdflib.js/releases{/id}","deployments_url":"https://api.github.com/repos/linkeddata/rdflib.js/deployments","created_at":"2011-12-13T23:22:49Z","updated_at":"2017-03-13T01:47:13Z","pushed_at":"2017-03-14T03:32:00Z","git_url":"git://github.com/linkeddata/rdflib.js.git","ssh_url":"git@github.com:linkeddata/rdflib.js.git","clone_url":"https://github.com/linkeddata/rdflib.js.git","svn_url":"https://github.com/linkeddata/rdflib.js","homepage":"","size":4428,"stargazers_count":195,"watchers_count":195,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":63,"mirror_url":null,"open_issues_count":60,"forks":63,"open_issues":60,"watchers":195,"default_branch":"master"}},"base":{"label":"linkeddata:master","ref":"master","sha":"aafbc6bb9ca87235540ddd9e4a14df96caf773f6","user":{"login":"linkeddata","id":1261005,"avatar_url":"https://avatars1.githubusercontent.com/u/1261005?v=3","gravatar_id":"","url":"https://api.github.com/users/linkeddata","html_url":"https://github.com/linkeddata","followers_url":"https://api.github.com/users/linkeddata/followers","following_url":"https://api.github.com/users/linkeddata/following{/other_user}","gists_url":"https://api.github.com/users/linkeddata/gists{/gist_id}","starred_url":"https://api.github.com/users/linkeddata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkeddata/subscriptions","organizations_url":"https://api.github.com/users/linkeddata/orgs","repos_url":"https://api.github.com/users/linkeddata/repos","events_url":"https://api.github.com/users/linkeddata/events{/privacy}","received_events_url":"https://api.github.com/users/linkeddata/received_events","type":"Organization","site_admin":false},"repo":{"id":2976235,"name":"rdflib.js","full_name":"linkeddata/rdflib.js","owner":{"login":"linkeddata","id":1261005,"avatar_url":"https://avatars1.githubusercontent.com/u/1261005?v=3","gravatar_id":"","url":"https://api.github.com/users/linkeddata","html_url":"https://github.com/linkeddata","followers_url":"https://api.github.com/users/linkeddata/followers","following_url":"https://api.github.com/users/linkeddata/following{/other_user}","gists_url":"https://api.github.com/users/linkeddata/gists{/gist_id}","starred_url":"https://api.github.com/users/linkeddata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkeddata/subscriptions","organizations_url":"https://api.github.com/users/linkeddata/orgs","repos_url":"https://api.github.com/users/linkeddata/repos","events_url":"https://api.github.com/users/linkeddata/events{/privacy}","received_events_url":"https://api.github.com/users/linkeddata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkeddata/rdflib.js","description":"Linked Data API for JavaScript","fork":false,"url":"https://api.github.com/repos/linkeddata/rdflib.js","forks_url":"https://api.github.com/repos/linkeddata/rdflib.js/forks","keys_url":"https://api.github.com/repos/linkeddata/rdflib.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkeddata/rdflib.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkeddata/rdflib.js/teams","hooks_url":"https://api.github.com/repos/linkeddata/rdflib.js/hooks","issue_events_url":"https://api.github.com/repos/linkeddata/rdflib.js/issues/events{/number}","events_url":"https://api.github.com/repos/linkeddata/rdflib.js/events","assignees_url":"https://api.github.com/repos/linkeddata/rdflib.js/assignees{/user}","branches_url":"https://api.github.com/repos/linkeddata/rdflib.js/branches{/branch}","tags_url":"https://api.github.com/repos/linkeddata/rdflib.js/tags","blobs_url":"https://api.github.com/repos/linkeddata/rdflib.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkeddata/rdflib.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkeddata/rdflib.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkeddata/rdflib.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkeddata/rdflib.js/statuses/{sha}","languages_url":"https://api.github.com/repos/linkeddata/rdflib.js/languages","stargazers_url":"https://api.github.com/repos/linkeddata/rdflib.js/stargazers","contributors_url":"https://api.github.com/repos/linkeddata/rdflib.js/contributors","subscribers_url":"https://api.github.com/repos/linkeddata/rdflib.js/subscribers","subscription_url":"https://api.github.com/repos/linkeddata/rdflib.js/subscription","commits_url":"https://api.github.com/repos/linkeddata/rdflib.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkeddata/rdflib.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkeddata/rdflib.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkeddata/rdflib.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkeddata/rdflib.js/contents/{+path}","compare_url":"https://api.github.com/repos/linkeddata/rdflib.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkeddata/rdflib.js/merges","archive_url":"https://api.github.com/repos/linkeddata/rdflib.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkeddata/rdflib.js/downloads","issues_url":"https://api.github.com/repos/linkeddata/rdflib.js/issues{/number}","pulls_url":"https://api.github.com/repos/linkeddata/rdflib.js/pulls{/number}","milestones_url":"https://api.github.com/repos/linkeddata/rdflib.js/milestones{/number}","notifications_url":"https://api.github.com/repos/linkeddata/rdflib.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkeddata/rdflib.js/labels{/name}","releases_url":"https://api.github.com/repos/linkeddata/rdflib.js/releases{/id}","deployments_url":"https://api.github.com/repos/linkeddata/rdflib.js/deployments","created_at":"2011-12-13T23:22:49Z","updated_at":"2017-03-13T01:47:13Z","pushed_at":"2017-03-14T03:32:00Z","git_url":"git://github.com/linkeddata/rdflib.js.git","ssh_url":"git@github.com:linkeddata/rdflib.js.git","clone_url":"https://github.com/linkeddata/rdflib.js.git","svn_url":"https://github.com/linkeddata/rdflib.js","homepage":"","size":4428,"stargazers_count":195,"watchers_count":195,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":63,"mirror_url":null,"open_issues_count":60,"forks":63,"open_issues":60,"watchers":195,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/172"},"html":{"href":"https://github.com/linkeddata/rdflib.js/pull/172"},"issue":{"href":"https://api.github.com/repos/linkeddata/rdflib.js/issues/172"},"comments":{"href":"https://api.github.com/repos/linkeddata/rdflib.js/issues/172/comments"},"review_comments":{"href":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/172/comments"},"review_comment":{"href":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linkeddata/rdflib.js/pulls/172/commits"},"statuses":{"href":"https://api.github.com/repos/linkeddata/rdflib.js/statuses/50d4a83c2d2d0b7aedebd2cbcfc1b4f22c9e6688"}}}}
{"actor":{"display_login":"dan-f"}}