Skip to content

JSON to Scala Case Class transformer creates an Int field even if the number is too long #4

@odisseus

Description

@odisseus

Example

Input

{
  "timestamp": 1415746800000
}

Output

case class RootInterface(
    timestamp: Int
)

Scala REPL (2.10.6)

scala> case class RootInterface(
     |     timestamp: Int
     | )
defined class RootInterface

scala> val x = RootInterface(timestamp = 1415746800000)
<console>:1: error: integer number too large
       val x = RootInterface(timestamp = 1415746800000)
                                         ^

scala> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions