Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.13.0-M1 on jawn-0.12.x, fs2-1.0.0-M1 #23

Merged
merged 6 commits into from
Jun 4, 2018
Merged

Conversation

rossabaker
Copy link
Member

No description provided.

aeons
aeons previously approved these changes Apr 25, 2018
*
* @param facade the Jawn facade to materialize `J`
* @tparam J the JSON AST to return
* @return the parsed JSON value, or the facade's concept of jnull if the source is empty
*/
def runJson[J](implicit F: Sync[F], absorbable: Absorbable[O], facade: Facade[J]): F[J] =
stream.parseJson(AsyncParser.SingleValue).compile.fold(facade.jnull())((_, json) => json)
runJsonOption.map(_.getOrElse(facade.jnull()))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should deprecate this one. Was null ever really a sensible default / empty / zero JSON value in the first place?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am uncertain. technically using an optional decoder of a top level object the two valid states are nothing and null, as a result I feel inclined this may still have a place.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not real fond of a default value like this where there isn't a monoid. Why is null any more of a default than "" or false or {} or [] or 0?

@rossabaker rossabaker dismissed stale reviews from aeons and ChristopherDavenport April 26, 2018 03:25

I changed stuff

Copy link
Member

@ChristopherDavenport ChristopherDavenport left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 . But I would love if we had someone who was more a json expert weigh in on the option topic.

*
* @param facade the Jawn facade to materialize `J`
* @tparam J the JSON AST to return
* @return the parsed JSON value, or the facade's concept of jnull if the source is empty
*/
def runJson[J](implicit F: Sync[F], absorbable: Absorbable[O], facade: Facade[J]): F[J] =
stream.parseJson(AsyncParser.SingleValue).compile.fold(facade.jnull())((_, json) => json)
runJsonOption.map(_.getOrElse(facade.jnull()))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am uncertain. technically using an optional decoder of a top level object the two valid states are nothing and null, as a result I feel inclined this may still have a place.

@rossabaker rossabaker dismissed ChristopherDavenport’s stale review June 4, 2018 03:59

Deprecated runJson, bumped to fs2-1.0.0-M1

@rossabaker rossabaker changed the title Release v0.13.0 on jawn-0.12.x Release v0.13.0-M1 on jawn-0.12.x, fs2-1.0.0-M1 Jun 4, 2018
@rossabaker
Copy link
Member Author

Change in plans: going all the way to fs2-1.0.0-M1. This, plus zainab-ali/fs2-reactive-streams#50, should be enough to unblock a milestone for http4s.

@rossabaker rossabaker merged commit f18956d into master Jun 4, 2018
@rossabaker rossabaker deleted the 0.13.0 branch June 4, 2018 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants