jborean93 / PSToml

PowerShell TOML Parser and Writer
MIT License
42 stars 6 forks source link

Better support for array serialization #8

Closed jborean93 closed 8 months ago

jborean93 commented 8 months ago

Ensure that any IList type like ArrayList or a Generic list is treated as a TOML array to align with how ConvertTo-Json works. Also properly deserializes a TOML array of array/table values into actual dotnet objects to provide a better deserialized value.

Fixes: https://github.com/jborean93/PSToml/issues/7

codecov[bot] commented 8 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (001d059) 89.26% compared to head (f95876c) 89.55%.

Files Patch % Lines
src/PSToml/ConvertFromToml.cs 75.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #8 +/- ## ========================================== + Coverage 89.26% 89.55% +0.29% ========================================== Files 3 3 Lines 149 249 +100 Branches 26 34 +8 ========================================== + Hits 133 223 +90 - Misses 7 16 +9 - Partials 9 10 +1 ``` | [Flag](https://app.codecov.io/gh/jborean93/PSToml/pull/8/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | Coverage Δ | | |---|---|---| | [PS_5.1_x64_Windows](https://app.codecov.io/gh/jborean93/PSToml/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `∅ <ø> (∅)` | | | [PS_7.2_x64_Linux](https://app.codecov.io/gh/jborean93/PSToml/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `89.55% <93.02%> (+0.29%)` | :arrow_up: | | [PS_7.2_x64_Windows](https://app.codecov.io/gh/jborean93/PSToml/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `∅ <ø> (∅)` | | | [PS_7.3_x64_Windows](https://app.codecov.io/gh/jborean93/PSToml/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `∅ <ø> (∅)` | | | [PS_7.4_x64_Linux](https://app.codecov.io/gh/jborean93/PSToml/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `89.55% <93.02%> (+0.29%)` | :arrow_up: | | [PS_7.4_x64_Windows](https://app.codecov.io/gh/jborean93/PSToml/pull/8/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean) | `∅ <ø> (∅)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jordan+Borean#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.