目录
目录README.md

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.

关于
1.5 MB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号