{"action":"created","comment":{"url":"https://api.github.com/repos/circe/circe-fs2/pulls/comments/133738937","pull_request_review_id":56954463,"id":133738937,"diff_hunk":"@@ -1,85 +1,114 @@\n package io.circe.fs2\n \n-import _root_.fs2.{ Stream, Task, text }\n-import io.circe.{ DecodingFailure, ParsingFailure }\n+import _root_.fs2.{Pipe, Stream, Task, pipe, text}\n+import io.circe.{DecodingFailure, Json, ParsingFailure}\n import io.circe.fs2.examples._\n import io.circe.generic.auto._\n import io.circe.syntax._\n-import scala.collection.immutable.{ Stream => StdStream }\n+import jawn.AsyncParser\n+import scala.collection.immutable.{Stream => StdStream}\n \n class Fs2Suite extends CirceSuite {\n   def fooStream(fooStdStream: StdStream[Foo], fooVector: Vector[Foo]): Stream[Task, Foo] =\n     Stream.emits(fooStdStream).append(Stream.emits(fooVector))\n-\n-  def serializeFoos(foos: Stream[Task, Foo]): Stream[Task, String] =\n-    Stream(\"[\").append(foos.map((_: Foo).asJson.spaces2).intersperse(\", \")).append(Stream(\"]\"))\n-\n+  \n+  def serializeFoos(parsingMode: AsyncParser.Mode, foos: Stream[Task, Foo]): Stream[Task, String] =\n+    parsingMode match {\n+      case AsyncParser.ValueStream =>\n+        foos.map((_: Foo).asJson.spaces2).intersperse(\"\\n\")\n+      case AsyncParser.UnwrapArray =>\n+        Stream(\"[\").append(foos.map((_: Foo).asJson.spaces2).intersperse(\", \")).append(Stream(\"]\"))\n+      case _ => ???","path":"src/test/scala/io/circe/fs2/Fs2Suite.scala","position":28,"original_position":28,"commit_id":"79a1d356b08474bd4b59221eb7225cc58334ef8e","original_commit_id":"79a1d356b08474bd4b59221eb7225cc58334ef8e","user":{"login":"BenFradet","id":1737211,"avatar_url":"https://avatars2.githubusercontent.com/u/1737211?v=4","gravatar_id":"","url":"https://api.github.com/users/BenFradet","html_url":"https://github.com/BenFradet","followers_url":"https://api.github.com/users/BenFradet/followers","following_url":"https://api.github.com/users/BenFradet/following{/other_user}","gists_url":"https://api.github.com/users/BenFradet/gists{/gist_id}","starred_url":"https://api.github.com/users/BenFradet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenFradet/subscriptions","organizations_url":"https://api.github.com/users/BenFradet/orgs","repos_url":"https://api.github.com/users/BenFradet/repos","events_url":"https://api.github.com/users/BenFradet/events{/privacy}","received_events_url":"https://api.github.com/users/BenFradet/received_events","type":"User","site_admin":false},"body":"aren't we better off testing for `SingleValue` too?","created_at":"2017-08-17T15:01:17Z","updated_at":"2017-08-17T15:07:59Z","html_url":"https://github.com/circe/circe-fs2/pull/11#discussion_r133738937","pull_request_url":"https://api.github.com/repos/circe/circe-fs2/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/circe/circe-fs2/pulls/comments/133738937"},"html":{"href":"https://github.com/circe/circe-fs2/pull/11#discussion_r133738937"},"pull_request":{"href":"https://api.github.com/repos/circe/circe-fs2/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/circe/circe-fs2/pulls/11","id":136264999,"html_url":"https://github.com/circe/circe-fs2/pull/11","diff_url":"https://github.com/circe/circe-fs2/pull/11.diff","patch_url":"https://github.com/circe/circe-fs2/pull/11.patch","issue_url":"https://api.github.com/repos/circe/circe-fs2/issues/11","number":11,"state":"open","locked":false,"title":"Allow different parsing modes","user":{"login":"aliyakamercan","id":691602,"avatar_url":"https://avatars3.githubusercontent.com/u/691602?v=4","gravatar_id":"","url":"https://api.github.com/users/aliyakamercan","html_url":"https://github.com/aliyakamercan","followers_url":"https://api.github.com/users/aliyakamercan/followers","following_url":"https://api.github.com/users/aliyakamercan/following{/other_user}","gists_url":"https://api.github.com/users/aliyakamercan/gists{/gist_id}","starred_url":"https://api.github.com/users/aliyakamercan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliyakamercan/subscriptions","organizations_url":"https://api.github.com/users/aliyakamercan/orgs","repos_url":"https://api.github.com/users/aliyakamercan/repos","events_url":"https://api.github.com/users/aliyakamercan/events{/privacy}","received_events_url":"https://api.github.com/users/aliyakamercan/received_events","type":"User","site_admin":false},"body":"I was running into a parse failures when trying to parse a stream of json objects. \r\n```scala\r\nval jsonStream = fs2.Stream.emit[Task, String](\"\"\"{\"a\": 1}\"\"\")\r\njsonStream.repeat.take(2).through(stringParser).run.unsafeRun()\r\n```\r\nwould result in \r\n`> io.circe.ParsingFailure: expected eof got { (line 1, column 9)`\r\n\r\n@travisbrown pointed me at https://github.com/circe/circe/pull/712\r\n@BenFradet @n4to4 \r\n","created_at":"2017-08-17T14:02:28Z","updated_at":"2017-08-17T15:07:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a8e5096dd0997306ff47ef32747ec90ab57c794","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/circe/circe-fs2/pulls/11/commits","review_comments_url":"https://api.github.com/repos/circe/circe-fs2/pulls/11/comments","review_comment_url":"https://api.github.com/repos/circe/circe-fs2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/circe/circe-fs2/issues/11/comments","statuses_url":"https://api.github.com/repos/circe/circe-fs2/statuses/79a1d356b08474bd4b59221eb7225cc58334ef8e","head":{"label":"aliyakamercan:parsing-modes","ref":"parsing-modes","sha":"79a1d356b08474bd4b59221eb7225cc58334ef8e","user":{"login":"aliyakamercan","id":691602,"avatar_url":"https://avatars3.githubusercontent.com/u/691602?v=4","gravatar_id":"","url":"https://api.github.com/users/aliyakamercan","html_url":"https://github.com/aliyakamercan","followers_url":"https://api.github.com/users/aliyakamercan/followers","following_url":"https://api.github.com/users/aliyakamercan/following{/other_user}","gists_url":"https://api.github.com/users/aliyakamercan/gists{/gist_id}","starred_url":"https://api.github.com/users/aliyakamercan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliyakamercan/subscriptions","organizations_url":"https://api.github.com/users/aliyakamercan/orgs","repos_url":"https://api.github.com/users/aliyakamercan/repos","events_url":"https://api.github.com/users/aliyakamercan/events{/privacy}","received_events_url":"https://api.github.com/users/aliyakamercan/received_events","type":"User","site_admin":false},"repo":{"id":100555220,"name":"circe-fs2","full_name":"aliyakamercan/circe-fs2","owner":{"login":"aliyakamercan","id":691602,"avatar_url":"https://avatars3.githubusercontent.com/u/691602?v=4","gravatar_id":"","url":"https://api.github.com/users/aliyakamercan","html_url":"https://github.com/aliyakamercan","followers_url":"https://api.github.com/users/aliyakamercan/followers","following_url":"https://api.github.com/users/aliyakamercan/following{/other_user}","gists_url":"https://api.github.com/users/aliyakamercan/gists{/gist_id}","starred_url":"https://api.github.com/users/aliyakamercan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliyakamercan/subscriptions","organizations_url":"https://api.github.com/users/aliyakamercan/orgs","repos_url":"https://api.github.com/users/aliyakamercan/repos","events_url":"https://api.github.com/users/aliyakamercan/events{/privacy}","received_events_url":"https://api.github.com/users/aliyakamercan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aliyakamercan/circe-fs2","description":"Streaming JSON parsing and decoding with fs2","fork":true,"url":"https://api.github.com/repos/aliyakamercan/circe-fs2","forks_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/forks","keys_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/teams","hooks_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/hooks","issue_events_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/issues/events{/number}","events_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/events","assignees_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/assignees{/user}","branches_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/branches{/branch}","tags_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/tags","blobs_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/git/refs{/sha}","trees_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/statuses/{sha}","languages_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/languages","stargazers_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/stargazers","contributors_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/contributors","subscribers_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/subscribers","subscription_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/subscription","commits_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/commits{/sha}","git_commits_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/git/commits{/sha}","comments_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/comments{/number}","issue_comment_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/issues/comments{/number}","contents_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/contents/{+path}","compare_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/merges","archive_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/downloads","issues_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/issues{/number}","pulls_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/pulls{/number}","milestones_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/milestones{/number}","notifications_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/labels{/name}","releases_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/releases{/id}","deployments_url":"https://api.github.com/repos/aliyakamercan/circe-fs2/deployments","created_at":"2017-08-17T03:00:42Z","updated_at":"2017-08-17T03:00:43Z","pushed_at":"2017-08-17T13:59:29Z","git_url":"git://github.com/aliyakamercan/circe-fs2.git","ssh_url":"git@github.com:aliyakamercan/circe-fs2.git","clone_url":"https://github.com/aliyakamercan/circe-fs2.git","svn_url":"https://github.com/aliyakamercan/circe-fs2","homepage":null,"size":17,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"circe:master","ref":"master","sha":"ebadfe5a74fb93a8aa7a600e5372441beb0e72b8","user":{"login":"circe","id":23644473,"avatar_url":"https://avatars0.githubusercontent.com/u/23644473?v=4","gravatar_id":"","url":"https://api.github.com/users/circe","html_url":"https://github.com/circe","followers_url":"https://api.github.com/users/circe/followers","following_url":"https://api.github.com/users/circe/following{/other_user}","gists_url":"https://api.github.com/users/circe/gists{/gist_id}","starred_url":"https://api.github.com/users/circe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/circe/subscriptions","organizations_url":"https://api.github.com/users/circe/orgs","repos_url":"https://api.github.com/users/circe/repos","events_url":"https://api.github.com/users/circe/events{/privacy}","received_events_url":"https://api.github.com/users/circe/received_events","type":"Organization","site_admin":false},"repo":{"id":89852889,"name":"circe-fs2","full_name":"circe/circe-fs2","owner":{"login":"circe","id":23644473,"avatar_url":"https://avatars0.githubusercontent.com/u/23644473?v=4","gravatar_id":"","url":"https://api.github.com/users/circe","html_url":"https://github.com/circe","followers_url":"https://api.github.com/users/circe/followers","following_url":"https://api.github.com/users/circe/following{/other_user}","gists_url":"https://api.github.com/users/circe/gists{/gist_id}","starred_url":"https://api.github.com/users/circe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/circe/subscriptions","organizations_url":"https://api.github.com/users/circe/orgs","repos_url":"https://api.github.com/users/circe/repos","events_url":"https://api.github.com/users/circe/events{/privacy}","received_events_url":"https://api.github.com/users/circe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/circe/circe-fs2","description":"Streaming JSON parsing and decoding with fs2","fork":false,"url":"https://api.github.com/repos/circe/circe-fs2","forks_url":"https://api.github.com/repos/circe/circe-fs2/forks","keys_url":"https://api.github.com/repos/circe/circe-fs2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/circe/circe-fs2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/circe/circe-fs2/teams","hooks_url":"https://api.github.com/repos/circe/circe-fs2/hooks","issue_events_url":"https://api.github.com/repos/circe/circe-fs2/issues/events{/number}","events_url":"https://api.github.com/repos/circe/circe-fs2/events","assignees_url":"https://api.github.com/repos/circe/circe-fs2/assignees{/user}","branches_url":"https://api.github.com/repos/circe/circe-fs2/branches{/branch}","tags_url":"https://api.github.com/repos/circe/circe-fs2/tags","blobs_url":"https://api.github.com/repos/circe/circe-fs2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/circe/circe-fs2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/circe/circe-fs2/git/refs{/sha}","trees_url":"https://api.github.com/repos/circe/circe-fs2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/circe/circe-fs2/statuses/{sha}","languages_url":"https://api.github.com/repos/circe/circe-fs2/languages","stargazers_url":"https://api.github.com/repos/circe/circe-fs2/stargazers","contributors_url":"https://api.github.com/repos/circe/circe-fs2/contributors","subscribers_url":"https://api.github.com/repos/circe/circe-fs2/subscribers","subscription_url":"https://api.github.com/repos/circe/circe-fs2/subscription","commits_url":"https://api.github.com/repos/circe/circe-fs2/commits{/sha}","git_commits_url":"https://api.github.com/repos/circe/circe-fs2/git/commits{/sha}","comments_url":"https://api.github.com/repos/circe/circe-fs2/comments{/number}","issue_comment_url":"https://api.github.com/repos/circe/circe-fs2/issues/comments{/number}","contents_url":"https://api.github.com/repos/circe/circe-fs2/contents/{+path}","compare_url":"https://api.github.com/repos/circe/circe-fs2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/circe/circe-fs2/merges","archive_url":"https://api.github.com/repos/circe/circe-fs2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/circe/circe-fs2/downloads","issues_url":"https://api.github.com/repos/circe/circe-fs2/issues{/number}","pulls_url":"https://api.github.com/repos/circe/circe-fs2/pulls{/number}","milestones_url":"https://api.github.com/repos/circe/circe-fs2/milestones{/number}","notifications_url":"https://api.github.com/repos/circe/circe-fs2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/circe/circe-fs2/labels{/name}","releases_url":"https://api.github.com/repos/circe/circe-fs2/releases{/id}","deployments_url":"https://api.github.com/repos/circe/circe-fs2/deployments","created_at":"2017-04-30T13:38:20Z","updated_at":"2017-08-06T16:30:13Z","pushed_at":"2017-08-17T14:02:29Z","git_url":"git://github.com/circe/circe-fs2.git","ssh_url":"git@github.com:circe/circe-fs2.git","clone_url":"https://github.com/circe/circe-fs2.git","svn_url":"https://github.com/circe/circe-fs2","homepage":null,"size":15,"stargazers_count":14,"watchers_count":14,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":2,"forks":3,"open_issues":2,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/circe/circe-fs2/pulls/11"},"html":{"href":"https://github.com/circe/circe-fs2/pull/11"},"issue":{"href":"https://api.github.com/repos/circe/circe-fs2/issues/11"},"comments":{"href":"https://api.github.com/repos/circe/circe-fs2/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/circe/circe-fs2/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/circe/circe-fs2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/circe/circe-fs2/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/circe/circe-fs2/statuses/79a1d356b08474bd4b59221eb7225cc58334ef8e"}}}}
{"actor":{"display_login":"BenFradet"}}