Trait/Object

io.fintrospect.formats

JsonFormat

Related Docs: object JsonFormat | package formats

Permalink

trait JsonFormat[ROOT_NODETYPE, NODETYPE] extends AnyRef

Capability to create and parse JSON message formats in a generic way. Used to serialise and deserialise request parameters and bodies.

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

Type Members

  1. type Field = (String, NODETYPE)

    Permalink

Abstract Value Members

  1. abstract def array(elements: NODETYPE*): NODETYPE

    Permalink

    Create a JSON array from the passed elements

  2. abstract def array(elements: Iterable[NODETYPE]): NODETYPE

    Permalink

    Create a JSON array from the passed elements

  3. abstract def boolean(value: Boolean): NODETYPE

    Permalink

    Create a JSON boolean node

  4. abstract def compact(in: ROOT_NODETYPE): String

    Permalink

    Compact printed JSON

  5. abstract def nullNode(): NODETYPE

    Permalink

    Create a null JSON node

  6. abstract def number(value: BigInteger): NODETYPE

    Permalink

    Create a JSON number node

  7. abstract def number(value: Long): NODETYPE

    Permalink

    Create a JSON number node

  8. abstract def number(value: BigDecimal): NODETYPE

    Permalink

    Create a JSON number node

  9. abstract def number(value: Int): NODETYPE

    Permalink

    Create a JSON number node

  10. abstract def obj(fields: Field*): ROOT_NODETYPE

    Permalink

    Create a JSON object from the passed String -> Node pairs

  11. abstract def obj(fields: Iterable[Field]): ROOT_NODETYPE

    Permalink

    Create a JSON object from the passed String -> Node pairs

  12. abstract def parse(in: String): ROOT_NODETYPE

    Permalink

    Attempt to parse the JSON into the root node type.

    Attempt to parse the JSON into the root node type. Implementations should throw an exception if the parsing fails, which is dealt with by the surrounding deserialisation mechanism, so you don't need to worry about having to muddy your own code with the exception handling.

  13. abstract def pretty(in: ROOT_NODETYPE): String

    Permalink

    Pretty printed JSON

  14. abstract def string(value: String): NODETYPE

    Permalink

    Create a JSON string node

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. def objSym(fields: (Symbol, NODETYPE)*): ROOT_NODETYPE

    Permalink

    Create a JSON object from the passed Symbol -> Node pairs

  16. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  17. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped