trait JsonSupport extends AnyRef
Supports conversion of commands, state variables and events to/from JSON
- Self Type
- JsonSupport with DerivedJsonFormats with WrappedArrayProtocol
- Alphabetic
- By Inheritance
- JsonSupport
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- lazy val commandTypeFormat: Format[CommandName]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- lazy val eventNameFormat: Format[EventName]
- lazy val eventTimeFormat: Format[EventTime]
-
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()
- lazy val idFormat: Format[Id]
-
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()
- lazy val obsIdFormat: Format[Option[ObsId]]
- lazy val paramSetFormat: Format[Set[Parameter[_]]]
- lazy val prefixFormat: Format[Prefix]
-
def
readEvent[A <: Event](json: JsValue): A
Reads an event back from JSON
Reads an event back from JSON
- A
the type of the event (use Any and match on the type if you don't know)
- json
the parsed JSON
- returns
an instance of the given event type, or an exception if the JSON is not valid for that type
-
def
readResult(json: JsValue): Result
Reads a Result back from JSON
Reads a Result back from JSON
- json
the parsed JSON
- returns
an instance of Result, or an exception if the JSON is not valid for that type
-
def
readSequenceCommand[A <: SequenceCommand](json: JsValue): A
Reads a SequenceCommand back from JSON
Reads a SequenceCommand back from JSON
- A
the type of the command (implied)
- json
the parsed JSON
- returns
an instance of the given SequenceCommand type, or an exception if the JSON is not valid for that type
-
def
readStateVariable[A <: StateVariable](json: JsValue): A
Reads a StateVariable back from JSON
Reads a StateVariable back from JSON
- A
the type of the StateVariable (implied)
- json
the parsed JSON
- returns
an instance of the given StateVariable, or an exception if the JSON is not valid for that type
- implicit val sequenceCommandFormat: Format[SequenceCommand]
- lazy val stateNameFormat: Format[StateName]
-
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( ... )
-
def
writeEvent[A <: Event](event: A): JsValue
Writes an event to JSON
Writes an event to JSON
- A
the type of the event (implied)
- event
any instance of EventType
- returns
a JsValue object representing the event
-
def
writeResult(result: Result): JsValue
Writes a Result to JSON
Writes a Result to JSON
- result
any instance of Result
- returns
a JsValue object representing the Result
-
def
writeSequenceCommand[A <: SequenceCommand](result: A): JsValue
Writes a SequenceParameterSet to JSON
Writes a SequenceParameterSet to JSON
- A
the type of the command (implied)
- result
any instance of SequenceCommand
- returns
a JsValue object representing the SequenceCommand
-
def
writeStateVariable[A <: StateVariable](stateVariable: A): JsValue
Writes a state variable to JSON
Writes a state variable to JSON
- A
the type of the StateVariable (implied)
- stateVariable
any instance of StateVariable
- returns
a JsValue object representing the StateVariable