Skip to content

Handle nested list for license data #319

@chinyeungli

Description

@chinyeungli
[
    {
      "path": "swagger/annotations/Api.java",
      "type": "file",
      "name": "Api.java",
      "base_name": "Api",
      "extension": ".java",
      "size": 5074,
      "date": "2017-07-15",
      "sha1": "c3a48ec7e684a35417241dd59507ec61702c508c",
      "md5": "326fb262bbb9c2ce32179f0450e24601",
      "mime_type": "text/plain",
      "file_type": "ASCII text",
      "programming_language": "Java",
      "is_binary": false,
      "is_text": true,
      "is_archive": false,
      "is_media": false,
      "is_source": true,
      "is_script": false,
      "licenses": [
        {
          "key": "apache-2.0",
          "score": 90.7,
          "short_name": "Apache 2.0",
          "category": "Permissive",
          "owner": "Apache Software Foundation",
          "homepage_url": "http://www.apache.org/licenses/",
          "text_url": "http://www.apache.org/licenses/LICENSE-2.0",
          "reference_url": "https://enterprise.dejacode.com/urn/urn:dje:license:apache-2.0",
          "spdx_license_key": "Apache-2.0",
          "spdx_url": "https://spdx.org/licenses/Apache-2.0",
          "start_line": 4,
          "end_line": 14,
          "matched_rule": {
            "identifier": "apache-2.0_7.RULE",
            "license_choice": false,
            "licenses": [
              "apache-2.0"
            ]
          }
        },
        {
          "key": "apache-2.0",
          "score": 40.0,
          "short_name": "Apache 2.0",
          "category": "Permissive",
          "owner": "Apache Software Foundation",
          "homepage_url": "http://www.apache.org/licenses/",
          "text_url": "http://www.apache.org/licenses/LICENSE-2.0",
          "reference_url": "https://enterprise.dejacode.com/urn/urn:dje:license:apache-2.0",
          "spdx_license_key": "Apache-2.0",
          "spdx_url": "https://spdx.org/licenses/Apache-2.0",
          "start_line": 8,
          "end_line": 8,
          "matched_rule": {
            "identifier": "apache-2.0_25.RULE",
            "license_choice": false,
            "licenses": [
              "apache-2.0"
            ]
          }
        }
      ],
      "files_count": 0,
      "dirs_count": 0,
      "size_count": 0,
      "scan_errors": []
    },
]

How do we want to handle a nested list in a JSON input?
OR do we want to support nested list at all?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions