Json

io.bullet.borer.Json
case object Json extends Target

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Target
class Object
trait Matchable
class Any
Show all
Self type
Json.type

Members list

Type members

Classlikes

final case class DecodingConfig(readIntegersAlsoAsFloatingPoint: Boolean, readDecimalNumbersOnlyAsNumberStrings: Boolean, maxNumberAbsExponent: Int, maxStringLength: Int, maxNumberMantissaDigits: Int, initialCharbufferSize: Int, allowBufferCaching: Boolean, allowDirectParsing: Boolean) extends DecodingConfig, Config

Value parameters

initialCharbufferSize

the initial size of the parser's Char buffer. Will grow to the max string length in the document rounded up to the next power of two

maxNumberAbsExponent

the maximum absolute exponent value to accept in JSON numbers

maxNumberMantissaDigits

the maximum number of digits to accept before the exponent in JSON numbers

maxStringLength

the maximum string length to accept Note: For performance reasons this is a soft limit, that the parser will sometimes overstep. The only guarantee is that it will never accept Strings that are more than twice as long as the this limit.

readDecimalNumbersOnlyAsNumberStrings

set to true to disable the fast, immediate conversion of JSON numbers to Double values where easily possible. In rare cases this might be necessary to allow for maximum possible precision when reading 32-bit Float values from JSON. (see https://github.com/sirthias/borer/issues/20 for more info on this)

readIntegersAlsoAsFloatingPoint

set to false to disable automatic conversion of integer to floating point values

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Config
trait Config
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class EncodingConfig(bufferSize: Int, allowBufferCaching: Boolean) extends EncodingConfig

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Config
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class TransDecodingConfig(readIntegersAlsoAsFloatingPoint: Boolean, readDoubleAlsoAsFloat: Boolean) extends Config

Value parameters

readDoubleAlsoAsFloat

set to false to disable automatic conversion of Double to Float values

readIntegersAlsoAsFloatingPoint

set to false to disable automatic conversion of integer to floating point values

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Config
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class TransEncodingConfig(maxBufferSize: Int, allowBufferCaching: Boolean, compressFloatingPointValues: Boolean) extends TransEncodingConfig

Value parameters

compressFloatingPointValues

set to false in order to always write floats as 32-bit values and doubles as 64-bit values, even if they could safely be represented with fewer bits

maxBufferSize

the max number of transcoding elements (not bytes!) that can be buffered

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait Config
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Inherited types

type MirroredElemLabels = EmptyTuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton

Value members

Concrete methods

def decode[T](value: T)(implicit p: Provider[T]): Api[DecodingConfig]

Entry point into the JSON decoding mini-DSL.

Entry point into the JSON decoding mini-DSL.

Attributes

def encode[T : Encoder](value: T): JsonApi[T, EncodingConfig]

Entry point into the JSON encoding mini-DSL.

Entry point into the JSON encoding mini-DSL.

Attributes

def reader[T](value: T, config: DecodingConfig, receiverWrapper: () => DecodingConfig)(implicit p: Provider[T]): Reader

Constructs a new Reader that reads JSON from the given Input.

Constructs a new Reader that reads JSON from the given Input.

Attributes

Entry point into the JSON transcoding mini-DSL.

Entry point into the JSON transcoding mini-DSL.

Attributes

def writer(output: Output, config: EncodingConfig, receiverWrapper: () => EncodingConfig): Writer

Constructs a new Writer that writes JSON to the given Output.

Constructs a new Writer that writes JSON to the given Output.

Attributes

Inherited methods

def fromProduct(p: Product): MirroredMonoType

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product