object ReadJson
Reads JSON files into a generic container. The values are stored as strings which need to be parsed to the desired type.
- Alphabetic
- By Inheritance
- ReadJson
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
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
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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.
-
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.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
-
def
readVector(str: String): Option[Seq[Container]]
Takes the file and parses the file into the Container class.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )