Packages

class Serializer extends AnyRef

Responsible for serializing scala data structure com.celadari.jsonlogicscala.tree.JsonLogicCore to json. May be extended to fit custom use cases. Providing the right configuration via com.celadari.jsonlogicscala.serialize.SerializerConf is enough to cover most cases. You may redefine methods to handle extreme uncommon cases.

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

Instance Constructors

  1. new Serializer()(implicit conf: SerializerConf)

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. implicit val conf: SerializerConf
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. def getMarshaller(typeValue: TypeValue): Marshaller

    Returns com.celadari.jsonlogicscala.serialize.Marshaller associated with input typeValue.

    Returns com.celadari.jsonlogicscala.serialize.Marshaller associated with input typeValue. If input typeValue is com.celadari.jsonlogicscala.tree.types.SimpleTypeValue then returns mapped value by marshallers attribute. If input typeValue is com.celadari.jsonlogicscala.tree.types.OptionTypeValue, com.celadari.jsonlogicscala.tree.types.ArrayTypeValue, com.celadari.jsonlogicscala.tree.types.MapTypeValue then a new com.celadari.jsonlogicscala.serialize.Marshaller is recursively created by checking paramType of input typeValue.

    returns

    Marshaller associated to typeValue.

    Attributes
    protected[this]
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. val marshallers: Map[String, Marshaller]

    Maps type_codename to com.celadari.jsonlogicscala.serialize.Marshaller.

    Attributes
    protected[this]
    Note

    More specifically, keys should be type_codename of com.celadari.jsonlogicscala.tree.types.SimpleTypeValue as generic types (OptionTypeValue, MapTypeValue, ArrayTypeValue) are handled recursively by getMarshaller.

  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def serialize(jsonLogicCore: JsonLogicCore): JsValue

    Returns serialized scala data structure.

    Returns serialized scala data structure.

    returns

    full structure with logic and data.

  18. def serializeArrayOfConditions(conditions: Array[JsonLogicCore]): (JsValue, JsObject)

    Returns tuple of serialized (logic, data) of scala data structure Array\[ com.celadari.jsonlogicscala.tree.JsonLogicCore\].

    Returns tuple of serialized (logic, data) of scala data structure Array\[ com.celadari.jsonlogicscala.tree.JsonLogicCore\]. Logic is returned in an array of JsValue and data by merging data JsObject of each condition.

    returns

    tuple of split (logic JsValue, data JsObject) from conditions.

    Attributes
    protected[this]
  19. def serializeComposeLogic(composeLogic: ComposeLogic): (JsValue, JsObject)

    Returns tuple of serialized (logic, data) of scala data structure com.celadari.jsonlogicscala.tree.ComposeLogic.

    Returns tuple of serialized (logic, data) of scala data structure com.celadari.jsonlogicscala.tree.ComposeLogic. Json-logic-typed format requires logic and data to split.

    returns

    (logic JsValue, data JsValue)

    Attributes
    protected[this]
  20. def serializeJsonLogicCore(jsonLogic: JsonLogicCore): (JsValue, JsValue)

    Returns tuple of serialized (logic, data) of scala data structure com.celadari.jsonlogicscala.tree.JsonLogicCore.

    Returns tuple of serialized (logic, data) of scala data structure com.celadari.jsonlogicscala.tree.JsonLogicCore. Json-logic-typed format requires logic and data to split.

    returns

    (logic JsValue, data JsValue)

    Attributes
    protected[this]
  21. def serializeValueLogic(valueLogic: ValueLogic[_]): (JsValue, JsValue)

    Returns tuple of serialized (logic, data) of scala data structure com.celadari.jsonlogicscala.tree.ValueLogic.

    Returns tuple of serialized (logic, data) of scala data structure com.celadari.jsonlogicscala.tree.ValueLogic. Json-logic-typed format requires logic and data to split.

    returns

    (logic JsValue, data JsValue)

    Attributes
    protected[this]
  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped