Packages

object Kson

Keyed simple object notation is a much simpler and more readable key value notation without needing quotes or commas, and intended for a single line

Kson (Key Separated Object Notation) is a simple format used for many of the configuration formats. The 'key' idea is to remain simple like CSV (Comma Separated Values). However, instead of using commas, use "<key>:" as the separation delimiter. Then instead of receiving a list of strings for a line of CSV you receive back key value pairs for a line of Kson. This provides for a flexible configuration and clean data encoding framework.

Where CSV returns an table of values, Kson can return a list of key value pairs per line or can squash all the key values together for a single key value lookup.

For example "person first:Aaron last:Radke language:scala desc:Use simple keys //with some comments" gets parsed to Map("/"" -> "person", "first" -> "Aaron", "last" -> "Radke", "language" -> "scala", "quote" -> "Use simple keys")

Source
kson.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Kson
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class Mutable[A <: Mutable[A]] extends StringMap

    mutable that executes call backs on change modifications

  2. class Watched extends Mutable[Watched]

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. def apply(files: Seq[File]): Kson
  5. def apply(in: Input): Kson
  6. def apply(string: String): Kson
  7. def apply(file: File): Kson
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. def empty: Kson
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. val interpolationPat: scala.util.matching.Regex
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  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. def watch(file: File)(implicit ec: drx.ExecutionContext): Watched

    ### simple init val kson = Kson.watch(f)

    ### simple init val kson = Kson.watch(f)

    ### init with call back (not needed often since the config is backed by an hash trie cache to automatically hold the newest version) val kson = Kson.watch(f).onUpdate{k => println(kson("config.parameter") + "was upated")}

    ### delayed init (useful for a global config reference that has not been filled in with a separate file setup arguments) val kson = Kson.Watched.empty kson.update(File("config.kson")) //updates the file and starts a watcher

  27. object Watched

    mutable that executes call backs on change modifications (call backs are added with onUpdate)

Inherited from AnyRef

Inherited from Any

Ungrouped