Package

ml.combust.bundle

json

Permalink

package json

Provides traits and objects for handling Bundle.ML JSON data with Spray JSON.

Overview

ml.combust.bundle.json.JsonSupport provides all spray.json.JsonFormat formats. Either import or mixin the formats into scope in order to use them.

scala> import ml.bundle.json.JsonSupport._
       import spray.json._
       import ml.bundle._
       val tt = TensorType.TensorType(BasicType.BasicType.DOUBLE, Seq(-1))
       val underlying = DataType.DataType.Underlying.Tensor(tt)
       val dataType = DataType.DataType(underlying)
scala> val jsonString = dataType.toJson.prettyPrint
jsonString: String =
{
  "type": "tensor",
  "tensor": {
  "base": "double",
  "dimensions": [-1]
  }
}
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. json
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait JsonLowPrioritySupport extends AnyRef

    Permalink

    Low priority implicit spray.json.JsonFormat formats for protobuf objects in Bundle.ML.

    Low priority implicit spray.json.JsonFormat formats for protobuf objects in Bundle.ML.

    Includes many spray.json.JsonFormat format implicits as well as several spray.json.RootJsonFormat format implicits for top-level JSON objects such as ml.combust.bundle.ModelDef.ModelDef and ml.combust.bundle.BundleDef.BundleDef.

    There are no members that need to be overriden if using this trait as a mixin.

  2. trait JsonSupport extends JsonLowPrioritySupport

    Permalink

    All spray.json.RootJsonFormat formats needed for Bundle.ML JSON serialization.

    All spray.json.RootJsonFormat formats needed for Bundle.ML JSON serialization.

    The 4 spray.json.RootJsonFormat formats provided are:

    These are the only 4 implicit formats needed to serialize Bundle.ML models.

Value Members

  1. object JsonSupport extends JsonSupport

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped