Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

JSONValue

Swift
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift

API reference · Markdown

enum JSONValue : enum JSONValue
enum [source]
enum [source]
enum JSONValue

Just enough JSON to carry ids, arguments and results through without knowing their shape.

An id is echoed back exactly as it arrived — a client that sends a string id and receives a number will not match them up.

Members

!=(_:_:)

!=(_:_:) ( lhs : Self , rhs : Self ) → Bool
functionstatic
functionstatic
!=(_:_:)

Inherited from Equatable.!=(_:_:)

Returns a Boolean value indicating whether two values are not equal.

Inequality is the inverse of equality. For any values a and b, a != b implies that a == b is false.

This is the default implementation of the not-equal-to operator (!=) for any type that conforms to Equatable.

  • Parameters:
    • lhs: A value to compare.
    • rhs: Another value to compare.

null

null : case null
constant [source]
constant [source]
null

bool(_:)

bool(_:) : case bool(Bool)
constant [source]
constant [source]
bool(_:)

integer(_:)

integer(_:) : case integer(Int64)
constant [source]
constant [source]
integer(_:)

unsignedInteger(_:)

unsignedInteger(_:) : case unsignedInteger(UInt64)
constant [source]
constant [source]
unsignedInteger(_:)

number(_:)

number(_:) : case number(Double)
constant [source]
constant [source]
number(_:)

string(_:)

string(_:) : case string(String)
constant [source]
constant [source]
string(_:)

array(_:)

array(_:) : case array([JSONValue])
constant [source]
constant [source]
array(_:)

object(_:)

object(_:) : case object([String : JSONValue])
constant [source]
constant [source]
object(_:)

init(from:)

init(from:) ( from : any Decoder )
method [source]
method [source]
init(from:)

Creates a new instance by decoding from the given decoder.

This initializer throws an error if reading from the decoder fails, or if the data read is corrupted or otherwise invalid.

  • Parameter decoder: The decoder to read data from.

encode(to:)

encode(to:) ( to : any Encoder ) → ()
method [source]
method [source]
encode(to:)

Encodes this value into the given encoder.

If the value fails to encode anything, encoder will encode an empty keyed container in its place.

This function throws an error if any values are invalid for the given encoder's format.

  • Parameter encoder: The encoder to write data to.

stringValue

stringValue : var stringValue: String?
property [source]
property [source]
stringValue

boolValue

boolValue : var boolValue: Bool?
property [source]
property [source]
boolValue

intValue

intValue : var intValue: Int?
property [source]
property [source]
intValue

doubleValue

doubleValue : var doubleValue: Double?
property [source]
property [source]
doubleValue

arrayValue

arrayValue : var arrayValue: [JSONValue]?
property [source]
property [source]
arrayValue

objectValue

objectValue : var objectValue: [String : JSONValue]?
property [source]
property [source]
objectValue

isNull

isNull : var isNull: Bool
property [source]
property [source]
isNull

==(_:_:)

==(_:_:) ( lhs : `Self` , rhs : `Self` ) → Bool
functionstatic [source]
functionstatic [source]
==(_:_:)

Returns a Boolean value indicating whether two values are equal.

Equality is the inverse of inequality. For any values a and b, a == b implies that a != b is false.

  • Parameters:
    • lhs: A value to compare.
    • rhs: Another value to compare.

hash(into:)

hash(into:) ( into : inout Hasher ) → ()
method [source]
method [source]
hash(into:)

Hashes the essential components of this value by feeding them into the given hasher.

Implement this method to conform to the Hashable protocol. The components used for hashing must be the same as the components compared in your type's == operator implementation. Call hasher.combine(_:) with each of these components.

  • Important: In your implementation of hash(into:) , don't call finalize() on the hasher instance provided, or replace it with a different instance. Doing so may become a compile-time error in the future.
  • Parameter hasher: The hasher to use when combining the components of this instance.
Esc

Type to search.