abstract class TableJsonFormat[T] extends RootJsonFormat[Table[T]]
Abstract class TableJsonFormat[T] which extends RootJsonFormat of Table[T]
- T
for which there must be evidence of JsonFormat[T].
- Alphabetic
- By Inheritance
- TableJsonFormat
- RootJsonFormat
- RootJsonWriter
- RootJsonReader
- JsonFormat
- JsonWriter
- JsonReader
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new TableJsonFormat()(implicit arg0: JsonFormat[T])
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- 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 read(json: JsValue): Table[T]
Reads a JSON representation of a table and converts it into a
Table[T]instance.Reads a JSON representation of a table and converts it into a
Table[T]instance.The JSON object is expected to represent a table structure with optional "header" and required "rows" keys. The "header" key, if present, should map to a JSON array of strings representing the table's header. The "rows" key should map to a JSON array of elements convertible to the type
T.- json
The JSON object to be parsed as a
Table[T]. The structure must include:- "rows": A JSON array representing the rows of the table, where each element of the array
can be converted to an instance of type
T. - (Optional) "header": A JSON array of strings representing the header of the table.
- "rows": A JSON array representing the rows of the table, where each element of the array
can be converted to an instance of type
- returns
A
Table[T]instance parsed from the provided JSON object. If "rows" is missing, an empty table is returned. If "header" is missing, the table's header will beNone.
- Definition Classes
- TableJsonFormat → JsonReader
- Exceptions thrown
DeserializationExceptionIf the input JSON is not a valid object or cannot be parsed as aTable[T].
- 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(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def write(table: Table[T]): JsValue
Serializes a
Table[T]object into a JSON representation.Serializes a
Table[T]object into a JSON representation.The JSON object will contain a "rows" key representing the serialized rows of the table, and, if a header exists, a "header" key that includes the serialized header.
- table
The
Table[T]instance to be serialized. The input must have amaybeHeader(optional header) and rows, where each row can be serialized to JSON.- returns
A
JsValuerepresenting the serialized JSON structure of the table.
- Definition Classes
- TableJsonFormat → JsonWriter
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)