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

Json marshal implementation #50

Closed
wants to merge 1 commit into from

Conversation

semihbkgr
Copy link
Contributor

@semihbkgr semihbkgr commented Dec 3, 2024

It is the implementation of json marshaling that preserves the order of records as maintained by the map. This was discussed in #12, but I needed this functionality for my use case, so I went ahead and implemented it.

@elliotchance, if you still think it's unnecessary to support this in the library itself, feel free to close it or keep it as a reference for anyone who might need something similar.


This change is Reviewable

@elliotchance
Copy link
Owner

#12 explains why it's not reasonable for orderedmap to implement JSON. There are multiple ways that suit different use cases. I'm sure this worked for you, but someone else will say they need the encoding format to be different. That's why it can't be handled directly by this type.

I'm open to discussing different encoding strategies (like a new type).

@semihbkgr semihbkgr closed this Dec 5, 2024
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