SOSwift

3.0.0

A swift implementation of Schema.org structured data vocabulary.
richardpiazza/SOSwift

What's New

SOSwift 3.0.0

2020-12-04T00:40:28Z

Signpost release... (Tests really need to be filled out)

SOSwift

A swift implementation of Schema.org structured data vocabulary.

Twitter: @richardpiazza

Usage

SOSwift is distributed using the Swift Package Manager. To install it into a project, add it as a dependency within your Package.swift manifest:

let package = Package(
    ...
    dependencies: [
        .package(url: "https://github.com/richardpiazza/SOSwift.git", .upToNextMinor(from: "1.1.0"))
    ],
    ...
)

Then import the SOSwift package wherever you'd like to use it:

import SOSwift

Schema.org

Schema.org is a collaborative, community activity with a mission to create, maintain, and promote schemas for structured data on the Internet, on web pages, in email messages, and beyond. This library implements some of the core vocabulary in the Swift language. This work is based on the 3.4 version of the Schema.org vocabulary, and currently implements only the top level core Thing subclasses.

Significant Differences

Although this body of work tries to adhere as closely as possible to the defined vocabulary, some changes are required to make the API feel swifty.

Float

Schema.org uses 'Float' as it's floating-point decimal type. 'Double' is the standard floating-point type in Swift, so double replaces all instances of float.

Has/Is

Many of the classes use a has/is prefix on non-boolean variable names. This vocabulary removes these prefixes.

Pluralization

Classes with singular names of clearly arrays of types has been pluralized for clarity and consistency.

Description

  • Swift Tools 5.1.0
View More Packages from this Author

Dependencies

Last updated: Tue Mar 26 2024 23:30:21 GMT-0900 (Hawaii-Aleutian Daylight Time)