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

Fix marshaling nested arrays of tables #395

Merged
merged 1 commit into from
May 7, 2020
Merged

Fix marshaling nested arrays of tables #395

merged 1 commit into from
May 7, 2020

Conversation

x-hgg-x
Copy link
Contributor

@x-hgg-x x-hgg-x commented May 4, 2020

This PR fixes marshaling for nested arrays of tables by adding support for inline tables.

Fixes #369.

@codecov
Copy link

codecov bot commented May 4, 2020

Codecov Report

Merging #395 into master will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #395      +/-   ##
==========================================
+ Coverage   95.24%   95.31%   +0.06%     
==========================================
  Files          10       10              
  Lines        2313     2304       -9     
==========================================
- Hits         2203     2196       -7     
+ Misses         70       68       -2     
  Partials       40       40              
Impacted Files Coverage Δ
marshal.go 96.18% <100.00%> (ø)
tomltree_write.go 95.15% <100.00%> (+0.46%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 249d0ea...9bd7cb4. Read the comment docs.

@pelletier
Copy link
Owner

Thank you for the patch, looks good! Any chance you might fix the conflicts before I merge please?

{nil, ""},
} {
result, err := tomlValueStringRepresentation(item.Value, "", "", OrderPreserve, false)
result, err := tomlValueStringRepresentation(item.Value, "", "", OrderAlphabetical, false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default is OrderAlphabetical.

@pelletier pelletier merged commit 96ff402 into pelletier:master May 7, 2020
@pelletier
Copy link
Owner

Thank you!

@x-hgg-x x-hgg-x deleted the marshal-nested-arrays-tables branch May 7, 2020 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Marshalling fails for nested arrays of tables
2 participants