Skip to content

JSONReference_PathComponent

mattpolzin edited this page Jun 11, 2021 · 3 revisions

JSONReference.PathComponent

A JSON Reference path component, as described by the JSON pointer specification.

public struct PathComponent: CodingKey, LosslessStringConvertible, RawRepresentable, ExpressibleByStringLiteral, Equatable, Hashable 

Inheritance

CodingKey, Equatable, ExpressibleByStringLiteral, Hashable, LosslessStringConvertible, RawRepresentable

Initializers

init(stringLiteral:)

public init(stringLiteral value: String) 

init(_:)

public init(_ description: String) 

init(rawValue:)

public init(rawValue: String) 

init(stringValue:)

public init(stringValue: String) 

init(intValue:)

Creates a PathComponent that represents the index in a JSON Array.

public init(intValue: Int) 

Properties

rawValue

public var rawValue: String 

stringValue

The string value produces the human-readable path component but not the proper string encoding of the path component per the specification. Use the rawValue for a proper spec encoding.

public var stringValue: String 

description

The description produces the human-readable path component but not the proper string encoding of the path component per the specification. Use the rawValue for a proper spec encoding.

public var description: String 

intValue

public var intValue: Int? 

Methods

property(named:)

public static func property(named name: String) -> Self 

index(_:)

public static func index(_ index: Int) -> Self 
Types
Protocols
Global Functions
Extensions
Clone this wiki locally