Qt attribution.json

From Qt Wiki
Revision as of 10:11, 20 July 2016 by Kkoehne (talk | contribs)
Jump to navigation Jump to search

This is currently only a proposal.

qt_attribution.json files are used to document 3rd party code inside the Qt modules. It is a JSON based format that can be processed with the licensescanner tool.

A qt_attribution.json file needs to contain one JSON object (or an array of JSON objects) with the following string properties:

Content

Name Description Usage in qdoc
Id Unique name for package, without spaces. All lower case. Mandatory. \target and part of page name
Name Descriptive name of the package, without version number. Camel case. Mandatory. \title
QDocModule The qch file the page should be part of. Mandatory. -
QtUsage Free text on where the 3rd party code in Qt is used, and how to avoid it (configure options?). Mandatory. Shown as text.
Path (Relative) path to the sources. Default is same directory is qt_attribution.json file. Optional. Shown as text.
Description A short description of what the package is and is used for. Optional. Shown as text.
Homepage Homepage of the upstream project. Optional. Shown as link.
Version Version used from the upstream project. Optional. Shown as text.
VersionLink Link to exact upstream version. Optional. Shown as link for Version text.
License The license under which the package is distributed, preferably with the names from SPDX 'Full Name'. Mandatory. Shown as text.
LicenseId SPDX ID. Optional. Shown as link (\l https://spdx.org/licenses/XXX).
LicenseFile Relative path to file containing the license text. Optional. Content is shown as text.
Copyright (Aggregated) list of copyright lines. Mandatory. Shown as text.

Example

{
    "Id": "sqlite",
    "Name": "SQLite",
    "QDocModule": "qtsql",
    "QtUsage": "Used in Qt SQL Lite plugin.",

    "Description": "SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.
Configure with -system-sqlite or -no-sqlite to avoid.",
    "Homepage": "http://www.sqlite.org/",
    "Version": "3.11.1.0",
    "License": "Public Domain"
    "Copyright": "The author disclaims copyright to this source code. However, a license can be obtained if needed.",
}