aboutcode-org/aboutcode-toolkit

transform issue about nested list

Closed this issue · 0 comments

The transform doesn't work properly for JSON file that has nested list. Following is a sample from SCTK:

   {
      "about_resource": "samples/README",
      "name": "README",
      "base_name": "README",
      "extension": "",
      "size": 236,
      "date": "2023-07-19",
      "mime_type": "text/plain",
      "file_type": "ASCII text",
      "programming_language": null,
      "is_binary": false,
      "is_text": true,
      "is_archive": false,
      "is_media": false,
      "is_source": false,
      "is_script": false,
      "package_data": [],
      "for_packages": [],
      "detected_license_expression": null,
      "detected_license_expression_spdx": null,
      "license_detections": [],
      "license_clues": [],
      "percentage_of_license_text": 0,
      "copyrights": [],
      "holders": [],
      "authors": [],
      "emails": [],
      "urls": [
         {
            "url": "http://zlib.net/zlib-1.2.8.tar.gz",
            "start_line": 3,
            "end_line": 3
         },
         {
            "url": "http://master.dl.sourceforge.net/project/javagroups/JGroups/2.10.0.GA/JGroups-2.10.0.GA.src.zip",
            "start_line": 4,
            "end_line": 4
         }
      ],
      "files_count": 0,
      "dirs_count": 0,
      "size_count": 0,
      "scan_errors": []
   },

The transform only works on the "first level" such as about_resource, name, urls etc... However, it doesn't work on the "second level" items (i.e url, start_line, and end_line).