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

Bring order to json #55

Merged
merged 2 commits into from
Oct 18, 2023
Merged

Bring order to json #55

merged 2 commits into from
Oct 18, 2023

Conversation

kkoehn
Copy link
Collaborator

@kkoehn kkoehn commented Oct 12, 2023

JSON doesn't guarantee the order of inserted keys, but the JSON2XMLConverter expects the keys to be in correct order.

This PR brings @@order to every json-object which stores an array of every contained node in the correct order.

  • bring order to chaos
  • fix existing tests
  • add dedicated test

@kkoehn kkoehn self-assigned this Oct 12, 2023
@kkoehn kkoehn force-pushed the bring_order_to_json branch 2 times, most recently from 2e5af98 to 2ac256e Compare October 13, 2023 15:44
@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #55 (a883074) into main (61934f6) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #55   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines          405       417   +12     
=========================================
+ Hits           405       417   +12     
Files Coverage Δ
lib/dachsfisch/json2_xml_converter.rb 100.00% <100.00%> (ø)
lib/dachsfisch/xml2_json_converter.rb 100.00% <100.00%> (ø)
spec/support/examples.rb 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@MrSerth MrSerth left a comment

Choose a reason for hiding this comment

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

Very nice and clean solution -- I like that pretty much! Congratulations 🥳

@kkoehn kkoehn marked this pull request as ready for review October 18, 2023 18:22
@kkoehn kkoehn force-pushed the bring_order_to_json branch from 2ac256e to 2585691 Compare October 18, 2023 18:35
@kkoehn kkoehn merged commit c113fcf into main Oct 18, 2023
7 checks passed
@kkoehn kkoehn deleted the bring_order_to_json branch October 18, 2023 19:22
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.

2 participants