{"action":"created","comment":{"url":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/comments/235836408","pull_request_review_id":177794393,"id":235836408,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTgzNjQwOA==","diff_hunk":"@@ -0,0 +1,47 @@\n+//\n+//  GrammarChecker.swift\n+//  JSONParser\n+//\n+//  Created by 조재흥 on 18. 11. 22..\n+//  Copyright © 2018 JK. All rights reserved.\n+//\n+\n+import Foundation\n+\n+struct GrammarChecker {\n+    static private let s = \"\\\\s*\"\n+    static private let d = \"\\\\d\"\n+    static private let w = \"\\\\w\"\n+    static private let bool = \"(true|false)\"\n+    static private let string = \"\\\"\\(s)(\\(w)|\\(s)|\\(d)|\\\\{|\\\\}|\\\\[|\\\\])+\\(s)\\\"\"\n+    \n+    static func check(input:String) -> Bool {\n+        guard !self.checkColonInArray(input: input) else {return  false}\n+        if input.hasPrefix(\"{\") && input.hasSuffix(\"}\") {\n+            guard checkObject(input: input) else {return false}","path":"JSONParser/JSONParser/GrammarChecker.swift","position":21,"original_position":21,"commit_id":"e813a27b6c42521f17e65576e10d60fa35622f68","original_commit_id":"e813a27b6c42521f17e65576e10d60fa35622f68","user":{"login":"godrm","id":278988,"node_id":"MDQ6VXNlcjI3ODk4OA==","avatar_url":"https://avatars1.githubusercontent.com/u/278988?v=4","gravatar_id":"","url":"https://api.github.com/users/godrm","html_url":"https://github.com/godrm","followers_url":"https://api.github.com/users/godrm/followers","following_url":"https://api.github.com/users/godrm/following{/other_user}","gists_url":"https://api.github.com/users/godrm/gists{/gist_id}","starred_url":"https://api.github.com/users/godrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godrm/subscriptions","organizations_url":"https://api.github.com/users/godrm/orgs","repos_url":"https://api.github.com/users/godrm/repos","events_url":"https://api.github.com/users/godrm/events{/privacy}","received_events_url":"https://api.github.com/users/godrm/received_events","type":"User","site_admin":false},"body":"어차피 정규표현식으로 비교할꺼면 hasPrefix()를 하지 않아도 매칭이 다 되지 않나요?","created_at":"2018-11-23T02:03:32Z","updated_at":"2018-11-23T02:04:49Z","html_url":"https://github.com/code-squad/swift-jsonparser/pull/102#discussion_r235836408","pull_request_url":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/102","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/comments/235836408"},"html":{"href":"https://github.com/code-squad/swift-jsonparser/pull/102#discussion_r235836408"},"pull_request":{"href":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/102"}}},"pull_request":{"url":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/102","id":232964342,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyOTY0MzQy","html_url":"https://github.com/code-squad/swift-jsonparser/pull/102","diff_url":"https://github.com/code-squad/swift-jsonparser/pull/102.diff","patch_url":"https://github.com/code-squad/swift-jsonparser/pull/102.patch","issue_url":"https://api.github.com/repos/code-squad/swift-jsonparser/issues/102","number":102,"state":"open","locked":false,"title":"Jsonparser step3","user":{"login":"hngfu","id":38850628,"node_id":"MDQ6VXNlcjM4ODUwNjI4","avatar_url":"https://avatars2.githubusercontent.com/u/38850628?v=4","gravatar_id":"","url":"https://api.github.com/users/hngfu","html_url":"https://github.com/hngfu","followers_url":"https://api.github.com/users/hngfu/followers","following_url":"https://api.github.com/users/hngfu/following{/other_user}","gists_url":"https://api.github.com/users/hngfu/gists{/gist_id}","starred_url":"https://api.github.com/users/hngfu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hngfu/subscriptions","organizations_url":"https://api.github.com/users/hngfu/orgs","repos_url":"https://api.github.com/users/hngfu/repos","events_url":"https://api.github.com/users/hngfu/events{/privacy}","received_events_url":"https://api.github.com/users/hngfu/received_events","type":"User","site_admin":false},"body":"### 구현내용\r\n\r\n- `GrammarChecker` 구조체를 생성하였습니다.\r\n- `Parser`객체가 create()하기전에 문법검사를 하고 알맞지 않은 문법이 있으면 *\"지원하지 않는 형식을 포함하고 있습니다.\"* 라는 멘트를 출력하도록 하였습니다.","created_at":"2018-11-22T12:34:07Z","updated_at":"2018-11-23T02:04:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5d5b6051ae7bd0e992f3898182ccdefac098e30","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/102/commits","review_comments_url":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/102/comments","review_comment_url":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code-squad/swift-jsonparser/issues/102/comments","statuses_url":"https://api.github.com/repos/code-squad/swift-jsonparser/statuses/e813a27b6c42521f17e65576e10d60fa35622f68","head":{"label":"hngfu:jsonparser-step3","ref":"jsonparser-step3","sha":"e813a27b6c42521f17e65576e10d60fa35622f68","user":{"login":"hngfu","id":38850628,"node_id":"MDQ6VXNlcjM4ODUwNjI4","avatar_url":"https://avatars2.githubusercontent.com/u/38850628?v=4","gravatar_id":"","url":"https://api.github.com/users/hngfu","html_url":"https://github.com/hngfu","followers_url":"https://api.github.com/users/hngfu/followers","following_url":"https://api.github.com/users/hngfu/following{/other_user}","gists_url":"https://api.github.com/users/hngfu/gists{/gist_id}","starred_url":"https://api.github.com/users/hngfu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hngfu/subscriptions","organizations_url":"https://api.github.com/users/hngfu/orgs","repos_url":"https://api.github.com/users/hngfu/repos","events_url":"https://api.github.com/users/hngfu/events{/privacy}","received_events_url":"https://api.github.com/users/hngfu/received_events","type":"User","site_admin":false},"repo":{"id":155309173,"node_id":"MDEwOlJlcG9zaXRvcnkxNTUzMDkxNzM=","name":"swift-jsonparser","full_name":"hngfu/swift-jsonparser","private":false,"owner":{"login":"hngfu","id":38850628,"node_id":"MDQ6VXNlcjM4ODUwNjI4","avatar_url":"https://avatars2.githubusercontent.com/u/38850628?v=4","gravatar_id":"","url":"https://api.github.com/users/hngfu","html_url":"https://github.com/hngfu","followers_url":"https://api.github.com/users/hngfu/followers","following_url":"https://api.github.com/users/hngfu/following{/other_user}","gists_url":"https://api.github.com/users/hngfu/gists{/gist_id}","starred_url":"https://api.github.com/users/hngfu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hngfu/subscriptions","organizations_url":"https://api.github.com/users/hngfu/orgs","repos_url":"https://api.github.com/users/hngfu/repos","events_url":"https://api.github.com/users/hngfu/events{/privacy}","received_events_url":"https://api.github.com/users/hngfu/received_events","type":"User","site_admin":false},"html_url":"https://github.com/hngfu/swift-jsonparser","description":"JSON문자열 분석기 저장소","fork":true,"url":"https://api.github.com/repos/hngfu/swift-jsonparser","forks_url":"https://api.github.com/repos/hngfu/swift-jsonparser/forks","keys_url":"https://api.github.com/repos/hngfu/swift-jsonparser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hngfu/swift-jsonparser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hngfu/swift-jsonparser/teams","hooks_url":"https://api.github.com/repos/hngfu/swift-jsonparser/hooks","issue_events_url":"https://api.github.com/repos/hngfu/swift-jsonparser/issues/events{/number}","events_url":"https://api.github.com/repos/hngfu/swift-jsonparser/events","assignees_url":"https://api.github.com/repos/hngfu/swift-jsonparser/assignees{/user}","branches_url":"https://api.github.com/repos/hngfu/swift-jsonparser/branches{/branch}","tags_url":"https://api.github.com/repos/hngfu/swift-jsonparser/tags","blobs_url":"https://api.github.com/repos/hngfu/swift-jsonparser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hngfu/swift-jsonparser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hngfu/swift-jsonparser/git/refs{/sha}","trees_url":"https://api.github.com/repos/hngfu/swift-jsonparser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hngfu/swift-jsonparser/statuses/{sha}","languages_url":"https://api.github.com/repos/hngfu/swift-jsonparser/languages","stargazers_url":"https://api.github.com/repos/hngfu/swift-jsonparser/stargazers","contributors_url":"https://api.github.com/repos/hngfu/swift-jsonparser/contributors","subscribers_url":"https://api.github.com/repos/hngfu/swift-jsonparser/subscribers","subscription_url":"https://api.github.com/repos/hngfu/swift-jsonparser/subscription","commits_url":"https://api.github.com/repos/hngfu/swift-jsonparser/commits{/sha}","git_commits_url":"https://api.github.com/repos/hngfu/swift-jsonparser/git/commits{/sha}","comments_url":"https://api.github.com/repos/hngfu/swift-jsonparser/comments{/number}","issue_comment_url":"https://api.github.com/repos/hngfu/swift-jsonparser/issues/comments{/number}","contents_url":"https://api.github.com/repos/hngfu/swift-jsonparser/contents/{+path}","compare_url":"https://api.github.com/repos/hngfu/swift-jsonparser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hngfu/swift-jsonparser/merges","archive_url":"https://api.github.com/repos/hngfu/swift-jsonparser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hngfu/swift-jsonparser/downloads","issues_url":"https://api.github.com/repos/hngfu/swift-jsonparser/issues{/number}","pulls_url":"https://api.github.com/repos/hngfu/swift-jsonparser/pulls{/number}","milestones_url":"https://api.github.com/repos/hngfu/swift-jsonparser/milestones{/number}","notifications_url":"https://api.github.com/repos/hngfu/swift-jsonparser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hngfu/swift-jsonparser/labels{/name}","releases_url":"https://api.github.com/repos/hngfu/swift-jsonparser/releases{/id}","deployments_url":"https://api.github.com/repos/hngfu/swift-jsonparser/deployments","created_at":"2018-10-30T02:02:25Z","updated_at":"2018-10-30T02:02:27Z","pushed_at":"2018-11-22T15:56:32Z","git_url":"git://github.com/hngfu/swift-jsonparser.git","ssh_url":"git@github.com:hngfu/swift-jsonparser.git","clone_url":"https://github.com/hngfu/swift-jsonparser.git","svn_url":"https://github.com/hngfu/swift-jsonparser","homepage":null,"size":1282,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"code-squad:hngfu","ref":"hngfu","sha":"0adf6b449a6e9c4af9757fe1df823562b0681e99","user":{"login":"code-squad","id":22832280,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODMyMjgw","avatar_url":"https://avatars2.githubusercontent.com/u/22832280?v=4","gravatar_id":"","url":"https://api.github.com/users/code-squad","html_url":"https://github.com/code-squad","followers_url":"https://api.github.com/users/code-squad/followers","following_url":"https://api.github.com/users/code-squad/following{/other_user}","gists_url":"https://api.github.com/users/code-squad/gists{/gist_id}","starred_url":"https://api.github.com/users/code-squad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-squad/subscriptions","organizations_url":"https://api.github.com/users/code-squad/orgs","repos_url":"https://api.github.com/users/code-squad/repos","events_url":"https://api.github.com/users/code-squad/events{/privacy}","received_events_url":"https://api.github.com/users/code-squad/received_events","type":"Organization","site_admin":false},"repo":{"id":106374447,"node_id":"MDEwOlJlcG9zaXRvcnkxMDYzNzQ0NDc=","name":"swift-jsonparser","full_name":"code-squad/swift-jsonparser","private":false,"owner":{"login":"code-squad","id":22832280,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODMyMjgw","avatar_url":"https://avatars2.githubusercontent.com/u/22832280?v=4","gravatar_id":"","url":"https://api.github.com/users/code-squad","html_url":"https://github.com/code-squad","followers_url":"https://api.github.com/users/code-squad/followers","following_url":"https://api.github.com/users/code-squad/following{/other_user}","gists_url":"https://api.github.com/users/code-squad/gists{/gist_id}","starred_url":"https://api.github.com/users/code-squad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-squad/subscriptions","organizations_url":"https://api.github.com/users/code-squad/orgs","repos_url":"https://api.github.com/users/code-squad/repos","events_url":"https://api.github.com/users/code-squad/events{/privacy}","received_events_url":"https://api.github.com/users/code-squad/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/code-squad/swift-jsonparser","description":"JSON문자열 분석기 저장소","fork":false,"url":"https://api.github.com/repos/code-squad/swift-jsonparser","forks_url":"https://api.github.com/repos/code-squad/swift-jsonparser/forks","keys_url":"https://api.github.com/repos/code-squad/swift-jsonparser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-squad/swift-jsonparser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-squad/swift-jsonparser/teams","hooks_url":"https://api.github.com/repos/code-squad/swift-jsonparser/hooks","issue_events_url":"https://api.github.com/repos/code-squad/swift-jsonparser/issues/events{/number}","events_url":"https://api.github.com/repos/code-squad/swift-jsonparser/events","assignees_url":"https://api.github.com/repos/code-squad/swift-jsonparser/assignees{/user}","branches_url":"https://api.github.com/repos/code-squad/swift-jsonparser/branches{/branch}","tags_url":"https://api.github.com/repos/code-squad/swift-jsonparser/tags","blobs_url":"https://api.github.com/repos/code-squad/swift-jsonparser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-squad/swift-jsonparser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-squad/swift-jsonparser/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-squad/swift-jsonparser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-squad/swift-jsonparser/statuses/{sha}","languages_url":"https://api.github.com/repos/code-squad/swift-jsonparser/languages","stargazers_url":"https://api.github.com/repos/code-squad/swift-jsonparser/stargazers","contributors_url":"https://api.github.com/repos/code-squad/swift-jsonparser/contributors","subscribers_url":"https://api.github.com/repos/code-squad/swift-jsonparser/subscribers","subscription_url":"https://api.github.com/repos/code-squad/swift-jsonparser/subscription","commits_url":"https://api.github.com/repos/code-squad/swift-jsonparser/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-squad/swift-jsonparser/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-squad/swift-jsonparser/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-squad/swift-jsonparser/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-squad/swift-jsonparser/contents/{+path}","compare_url":"https://api.github.com/repos/code-squad/swift-jsonparser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-squad/swift-jsonparser/merges","archive_url":"https://api.github.com/repos/code-squad/swift-jsonparser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-squad/swift-jsonparser/downloads","issues_url":"https://api.github.com/repos/code-squad/swift-jsonparser/issues{/number}","pulls_url":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls{/number}","milestones_url":"https://api.github.com/repos/code-squad/swift-jsonparser/milestones{/number}","notifications_url":"https://api.github.com/repos/code-squad/swift-jsonparser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-squad/swift-jsonparser/labels{/name}","releases_url":"https://api.github.com/repos/code-squad/swift-jsonparser/releases{/id}","deployments_url":"https://api.github.com/repos/code-squad/swift-jsonparser/deployments","created_at":"2017-10-10T06:00:00Z","updated_at":"2018-08-18T03:08:11Z","pushed_at":"2018-11-22T15:56:33Z","git_url":"git://github.com/code-squad/swift-jsonparser.git","ssh_url":"git@github.com:code-squad/swift-jsonparser.git","clone_url":"https://github.com/code-squad/swift-jsonparser.git","svn_url":"https://github.com/code-squad/swift-jsonparser","homepage":null,"size":1324,"stargazers_count":2,"watchers_count":2,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":21,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/102"},"html":{"href":"https://github.com/code-squad/swift-jsonparser/pull/102"},"issue":{"href":"https://api.github.com/repos/code-squad/swift-jsonparser/issues/102"},"comments":{"href":"https://api.github.com/repos/code-squad/swift-jsonparser/issues/102/comments"},"review_comments":{"href":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/102/comments"},"review_comment":{"href":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code-squad/swift-jsonparser/pulls/102/commits"},"statuses":{"href":"https://api.github.com/repos/code-squad/swift-jsonparser/statuses/e813a27b6c42521f17e65576e10d60fa35622f68"}},"author_association":"NONE"}}
{"actor":{"display_login":"godrm"}}