Repository: spdx/tools-python

Issue:
Conversion from JSON tag:value gives invalid SPDX
hello.spdx.json contains:
```
"filesAnalyzed": true,
```

Converting from JSON to tag:value

hello.spdx contains:
```
FilesAnalyzed: True
```
that is invalid as tags and format properties are case sensitive.

[hello.spdx.json.txt](https://github.com/spdx/tools-python/files/12539153/hello.spdx.json.txt)
[hello.spdx.txt](https://github.com/spdx/tools-python/files/12539154/hello.spdx.txt)


Discussion:

Patch:
diff --git a/src/spdx_tools/spdx/writer/tagvalue/package_writer.py b/src/spdx_tools/spdx/writer/tagvalue/package_writer.py
index 9be4ec4..f61474f 100644
--- a/src/spdx_tools/spdx/writer/tagvalue/package_writer.py
+++ b/src/spdx_tools/spdx/writer/tagvalue/package_writer.py
@@ -33,7 +33,7 @@ def write_package(package: Package, text_output: TextIO):
     write_actor("PackageOriginator", package.originator, text_output)
     write_value("PackageDownloadLocation", package.download_location, text_output)
 
-    write_value("FilesAnalyzed", package.files_analyzed, text_output)
+    write_value("FilesAnalyzed", str(package.files_analyzed).lower(), text_output)
     if package.verification_code:
         package_verification_code = get_package_verification_code_string(package.verification_code)
         write_value("PackageVerificationCode", package_verification_code, text_output)


Test patch:
diff --git a/tests/spdx/writer/tagvalue/test_package_writer.py b/tests/spdx/writer/tagvalue/test_package_writer.py
index 26c8f9a..994931e 100644
--- a/tests/spdx/writer/tagvalue/test_package_writer.py
+++ b/tests/spdx/writer/tagvalue/test_package_writer.py
@@ -27,7 +27,7 @@ def test_package_writer():
             call(f"PackageSupplier: Person: {package.supplier.name} ({package.supplier.email})\n"),
             call(f"PackageOriginator: Person: {package.originator.name} ({package.originator.email})\n"),
             call(f"PackageDownloadLocation: {package.download_location}\n"),
-            call("FilesAnalyzed: True\n"),
+            call("FilesAnalyzed: true\n"),
             call(f"PackageVerificationCode: {package.verification_code.value} (excludes: ./exclude.py)\n"),
             call("PackageChecksum: SHA1: 71c4025dd9897b364f3ebbb42c484ff43d00791c\n"),
             call(f"PackageHomePage: {package.homepage}\n"),
diff --git a/tests/spdx/writer/tagvalue/test_tagvalue_writer.py b/tests/spdx/writer/tagvalue/test_tagvalue_writer.py
index 86e7a2f..487ee0d 100644
--- a/tests/spdx/writer/tagvalue/test_tagvalue_writer.py
+++ b/tests/spdx/writer/tagvalue/test_tagvalue_writer.py
@@ -114,7 +114,7 @@ def test_correct_order_of_elements():
             call("PackageName: Test Package A\n"),
             call("SPDXID: SPDXRef-Package-A\n"),
             call("PackageDownloadLocation: \n"),
-            call("FilesAnalyzed: True\n"),
+            call("FilesAnalyzed: true\n"),
             call("\n"),
             call("## File Information\n"),
             call("FileName: Test File B\n"),
@@ -130,7 +130,7 @@ def test_correct_order_of_elements():
             call("PackageName: Test Package B\n"),
             call("SPDXID: SPDXRef-Package-B\n"),
             call("PackageDownloadLocation: \n"),
-            call("FilesAnalyzed: True\n"),
+            call("FilesAnalyzed: true\n"),
             call("\n"),
             call("\n"),
         ]
@@ -199,7 +199,7 @@ def test_same_file_in_multiple_packages():
             call("PackageName: Example package A\n"),
             call("SPDXID: SPDXRef-Package-A\n"),
             call("PackageDownloadLocation: https://download.com\n"),
-            call("FilesAnalyzed: True\n"),
+            call("FilesAnalyzed: true\n"),
             call("\n"),
             call("## File Information\n"),
             call("FileName: Example file\n"),
@@ -210,7 +210,7 @@ def test_same_file_in_multiple_packages():
             call("PackageName: Example package B\n"),
             call("SPDXID: SPDXRef-Package-B\n"),
             call("PackageDownloadLocation: https://download.com\n"),
-            call("FilesAnalyzed: True\n"),
+            call("FilesAnalyzed: true\n"),
             call("\n"),
             call("## Relationships\n"),
             call("Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-Package-A\n"),