Int
struct Int : SignedInteger, Comparable, Equatable
-
A method used to retrieve a value from a given array for a specific index. - parameter array: An
Array
ofJSON
. - throws:.IndexOutOfBounds
with an associated value ofself
, whereself
is anInt
, should the index not be within the valid range for the array ofJSON
. - returns: TheJSON
value found at the given index.Parameters
array
An
Array
ofJSON
.Return Value
The
JSON
value found at the given index.
-
An initializer to create an instance of
Int
from aJSON
value. - parameter json: An instance ofJSON
. - throws: The initializer will throw an instance ofJSON.Error
if an instance ofInt
cannot be created from theJSON
value that was passed to this initializer.Declaration
Swift
public init(json: JSON) throws
Parameters
json
An instance of
JSON
.