Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document ScanCode JSON ouput format #2596

Open
AvishrantsSh opened this issue Jul 12, 2021 · 3 comments
Open

Document ScanCode JSON ouput format #2596

AvishrantsSh opened this issue Jul 12, 2021 · 3 comments

Comments

@AvishrantsSh
Copy link

The format in which scancode.io accepts the input from pipelines is not very clear. Right now, scancode.io is built to support output generated by scancode-toolkit. Also, it seems that scancode.io uses just a handful of those results, making it even harder to figure out. Besides this, other tools and pipelines may or may not be that descriptive in their output and some sort of data marshalling may be required.
So, I think that we should decide on a uniform and consistent structure that will be acceptible by scancode.io, which can serve as a template for other pipelines.

@AvishrantsSh
Copy link
Author

A general outline of the structure can be

{
    "path": "<-path to file->",
    "type": "<-type->",
    "licenses": [
        {
            "key": "<-license key->",
            "score": "<-score-> (maybe optional?)",
            "name": "<-license name->",
            "category": "<-license category->",
            "start_line": "<-start_line->",
            "end_line": "<-end_line->"
        }
    ],
    "license_expressions": [
        "<--can be obtained from licenses too-->"
    ],
    "copyrights": [
        {
            "value": "<-copyright details->",
            "start_line": "<-start_line->",
            "end_line": "<-end_line->"
        }
    ],
    "holders": [
        {
            "value": "First",
            "start_line": "<-start_line-> (maybe optional?)",
            "end_line": "<-end_line-> (maybe optional?)"
        }
    ],
    "scan_errors": []
}

@pombredanne
Copy link
Member

That's a good point, but that's more of a ScanCode-TK issue where we should document the format (as discussed in the AboutCode weekly this week).
So I am going top move this ticket to the SCTK.

@pombredanne pombredanne transferred this issue from aboutcode-org/scancode.io Jul 14, 2021
@pombredanne pombredanne changed the title Result format for newer pipelines Document ScanCode JSON ouput format Jul 14, 2021
@AyanSinhaMahapatra
Copy link
Member

See also #2008 #2425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants