Json.opCast

Converts the JSON value to the corresponding D type - types must match exactly.

More...
  1. T opCast()
  2. inout(T) opCast()
    struct Json
    @safe inout
    inout(T)
    opCast
    (
    T
    )
    ()
    if (
    !is(T == JSONValue)
    )

Detailed Description

Available Types

  • bool (Type.bool_)
  • double (Type.float_)
  • float (Converted from double)
  • long (Type.int_)
  • ulong, int, uint, short, ushort, byte, ubyte (Converted from long)
  • string (Type.string)
  • Json[] (Type.array)
  • Json[string] (Type.object)

See Also

opt, to, deserializeJson

Meta