Topic/jnumber

Well, there is safeLong and safeInt for that.

On Thu, Sep 25, 2014 at 3:06 AM, Sean Parsons <notifications@github.com>
wrote:

> In src/main/scala/argonaut/JsonNumber.scala:
>
> > @@ -0,0 +1,87 @@
> > +package argonaut
> > +
> > +import scalaz.Equal
> > +import scalaz.Scalaz._
> > +import monocle.function._
> > +import monocle.std._
> > +
> > +/**
> > + * JSON numbers with optimization by cases.
> > + * Note: Javascript numbers are 64-bit decimals.
> > + */
> > +sealed abstract class JsonNumber {
> > +  import Json._
> > +
> > +  def toDouble: Double
>
> I'm wondering if they should return Option[X] so as to represent values
> that fall outside the permitted range?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/argonaut-io/argonaut/pull/140/files#r18017385>.
>