Packages

  • package root
    Definition Classes
    root
  • package myscala
    Definition Classes
    root
  • package input

    The main usage of the input library is to read the printed JSON files to test whether the output format is correct.

    The main usage of the input library is to read the printed JSON files to test whether the output format is correct. Nevertheless, they can still be used to read JSON files in a specific application.

    Definition Classes
    myscala
  • ReadJson
o

myscala.input

ReadJson

object ReadJson

Reads JSON files into a generic container. The values are stored as strings which need to be parsed to the desired type.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReadJson
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Container(str: String, v: List[String]) extends Product with Serializable

    Container with the field name form the JSON file and the list of items stored as strings.

    Container with the field name form the JSON file and the list of items stored as strings. They can easily be converted to doubles or ints with scala's methods.

    str

    fieldname

    v

    list of strings representing the data

  2. case class ContainerMultipleVector(str: String, v: Seq[Container]) extends Product with Serializable

    Container which stores a sequence of sub containers.

    Container which stores a sequence of sub containers. Similarly to the other subcontainer, the fieldname is salso stored.

    str

    fieldname from JSON

    v

    sequence of containers stoing the data using the Container case class.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. implicit val Container2Reads: Reads[ContainerMultipleVector]

    implicit reader for the play framework to convert the strings to JSON format.

    implicit reader for the play framework to convert the strings to JSON format. Reads a JSON file looking like { "scalatest" : { "a" : [ "1.5", "2.0", "3.0" ], "b" : [ "6.0", "7.0", "8.99", "9.0", "10.0" ], "c" : [ "4.0", "15.0" ] } } and fills the ContainerMultipleVector class with the data.

  5. implicit val ContainerReads: Reads[Seq[Container]]

    implicit reader for the play framework to convert the strings to JSON format.

    implicit reader for the play framework to convert the strings to JSON format. Reads a JSON file looking like { "scalatest" : [ "1.1", "2.01", "3.0005", "4.99", "5", "6", "7", "8", "9", "10.1" ] } and fills the Container class with the data.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def readMultipleVectors(str: String): Option[ContainerMultipleVector]

    Takes the file and parses the file into the ContainerMultipleVector class.

    Takes the file and parses the file into the ContainerMultipleVector class.

    str

    file to read

    returns

    ContainerMultipleVector storing the data

  18. def readVector(str: String): Option[Seq[Container]]

    Takes the file and parses the file into the Container class.

    Takes the file and parses the file into the Container class.

    str

    file to read

    returns

    Container storing the data

  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped