Skip to content

Conversation

@HamdiSaidaniX
Copy link
Contributor

Added new XML to JSON converter utility with full SEO content and related tool links.

@peckz
Copy link
Collaborator

peckz commented Dec 29, 2025

@HamdiSaidaniX Thank you!
I suggest extracting those functions into a helper file and adding a couple of tests to make sure everything is running smoothly!

You can find an example in json-to-csv.utils.ts and json-to-csv.test.ts

@HamdiSaidaniX
Copy link
Contributor Author

@peckz Thank you for the feedback! I've made the following updates:

✅ Extracted xmlToJson function into a separate helper file (lib/xmlToJson.ts)
✅ Added comprehensive unit tests covering basic conversion, attributes, arrays, text content, and error handling

Let me know if there's anything else you'd like me to adjust!

2 similar comments
@HamdiSaidaniX

This comment was marked as duplicate.

@HamdiSaidaniX

This comment was marked as duplicate.

@peckz
Copy link
Collaborator

peckz commented Jan 5, 2026

Thank you! @HamdiSaidaniX

I pushed couple of small commits:

  • renamed file to match existing naming convention
  • added complex test case for converter
  • updated SEO component, I saw some sneaky converter links there 😉
  • added contribution component

@HamdiSaidaniX
Copy link
Contributor Author

HamdiSaidaniX commented Jan 5, 2026 via email

@peckz
Copy link
Collaborator

peckz commented Jan 5, 2026

@HamdiSaidaniX I understand, but doing things like that could break our promises:

  • tools are free and open source
  • no ads
  • all data stays local

If the user is redirected to an external site, everything changes; at some point, your domain can expire, and someone can easily slap a ton of ads there.

We appreciate all contributors — we credit them right below the tool with link to their GitHub profile.

@HamdiSaidaniX
Copy link
Contributor Author

HamdiSaidaniX commented Jan 5, 2026 via email

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new XML to JSON converter utility to the Jam.dev tools collection. The implementation provides client-side XML parsing and conversion with proper error handling, comprehensive test coverage, and SEO-optimized content.

Key Changes:

  • Implemented a new XML to JSON conversion utility with DOMParser-based parsing
  • Added comprehensive test suite with 632 lines covering basic conversion, attributes, arrays, text content, error handling, and complex nested structures
  • Created SEO component with detailed documentation about XML/JSON conversion use cases and features

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pages/utilities/xml-to-json.tsx New converter page component following established patterns with proper input handling, real-time conversion, and error messages
components/utils/xml-to-json.utils.ts Core conversion logic using DOMParser with attribute preservation, array detection, and industry-standard @attributes/#text conventions
components/utils/xml-to-json.test.ts Comprehensive test suite covering edge cases including empty elements, attributes, arrays, nested structures, and a complex library XML example
components/seo/XmlToJsonSEO.tsx SEO content component with feature descriptions, FAQs, conversion format explanation, and related tool links
components/utils/tools-list.ts Added XML to JSON tool entry to the tools listing with appropriate description and link

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@peckz peckz merged commit a725df9 into jamdotdev:main Jan 5, 2026
7 checks passed
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