muster

package muster

Muster is a library that leverages macros to generate serializers for your objects

A library for macro based serializers to different formats. It uses scala macros so no reflection is involved and it will generate code at compile time that kind of looks like it would have been handwritten. It is written with the idea of extension, so it's easy to add your own formats.

You can find more documentation on the wiki

Getting the library

This works with scala 2.10 and up. Check the releases page for the latest version. The library is published to maven central so you can get it with:

libraryDependencies += "org.json4s" %% "muster-codec-jawn" % "latest"
libraryDependencies += "org.json4s" %% "muster-codec-jackson" % "latest"
Examples:
  1. Prettier case class for debugging:

    libraryDependencies += "org.json4s" %% "muster-codec-string" % "latest"
  2. ,
  3. Bring your own AST (BYA):

    libraryDependencies += "org.json4s" %% "muster-codec-json4s" % "latest"
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. muster
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type ByteArrayConsumable = muster.input.ByteArrayConsumable

  2. type ByteBufferConsumable = muster.input.ByteBufferConsumable

  3. type ByteChannelConsumable = muster.input.ByteChannelConsumable

  4. type ByteChannelProducible = muster.output.ByteChannelProducible

  5. type Consumable[T] = muster.input.Consumable[T]

  6. type Consumer[T] = muster.input.Consumer[T]

  7. class EndOfInput extends Throwable with NoStackTrace

    thrown when there is no more input to be gotten

  8. type FileConsumable = muster.input.FileConsumable

  9. type FileProducible = muster.output.FileProducible

  10. class Helper[C <: Context] extends AnyRef

    A utility class for the generator macros

  11. type InputStreamConsumable = muster.input.InputStreamConsumable

  12. trait MapKeySerializer[T] extends AnyRef

    A map key serializer type class

  13. class MappingException extends Throwable

    thrown when there is a problem mapping a value from or to a muster.ast.AstNode

  14. type OutputStreamProducible = muster.output.OutputStreamProducible

  15. class ParseException extends Throwable

    thrown when an error occurs during parsing of a stream

  16. case class ParseLocation(line: Int, col: Int, source: Option[String] = scala.None) extends Product with Serializable

    The location of a parser when some interesting event occurs

  17. type Producer[T] = muster.output.Producer[T]

  18. type Producible[T, R] = muster.output.Producible[T, R]

  19. type ReaderConsumable = muster.input.ReaderConsumable

  20. type StringConsumable = muster.input.StringConsumable

  21. type URLConsumable = muster.input.URLConsumable

  22. type WriterProducible = muster.output.WriterProducible

Value Members

  1. object BuildInfo extends Product with Serializable

  2. val ByteArrayConsumable: muster.input.ByteArrayConsumable.type

  3. val ByteArrayProducible: muster.output.ByteArrayProducible.type

  4. val ByteBufferConsumable: muster.input.ByteBufferConsumable.type

  5. val ByteBufferProducible: muster.output.ByteBufferProducible.type

  6. val ByteChannelConsumable: muster.input.ByteChannelConsumable.type

  7. val ByteChannelProducible: muster.output.ByteChannelProducible.type

  8. val Consumable: muster.input.Consumable.type

  9. val Consumer: muster.input.Consumer.type

  10. val FileConsumable: muster.input.FileConsumable.type

  11. val FileProducible: muster.output.FileProducible.type

  12. val InputStreamConsumable: muster.input.InputStreamConsumable.type

  13. object MapKeySerializer

    Companion object with default map key serialzers

  14. val OutputStreamProducible: muster.output.OutputStreamProducible.type

  15. val Producer: muster.output.Producer.type

  16. val Producible: muster.output.Producible.type

  17. val ReaderConsumable: muster.input.ReaderConsumable.type

  18. val StringConsumable: muster.input.StringConsumable.type

  19. val StringProducible: muster.output.StringProducible.type

  20. val URLConsumable: muster.input.URLConsumable.type

  21. val WriterProducible: muster.output.WriterProducible.type

  22. package ast

  23. package input

  24. package jackson

  25. package output

  26. package util

Inherited from AnyRef

Inherited from Any

Ungrouped