-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add ability to sort mixed-type lists to JsonSlurper #58
Conversation
@@ -66,6 +66,8 @@ Current | |||
|
|||
- [#45, removing sorting from weight check queries](https://github.com/yahoo/fili/pull/46) | |||
|
|||
- `JsonSlurper` can now handle sorting lists with mixed-type entries, even if the list starts with a string, number, or | |||
boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a link to the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -5,6 +5,7 @@ | |||
/* | |||
* Changed HashMap to LinkedHashMap for consistency. Added ability to optionally sort the lists and maps. | |||
*/ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was borrowed from Groovy right? While we're here, we really should update the copyright notification to reflect that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
👍 (Once Andrew is satisfied) |
👍 |
Also corrected licensing for JsonSlurper
b3bd292
to
7052d0a
Compare
Before, if a list started with a
Comparable
(ie. string, boolean, or number), it would be sorted using the objects' comparability. This broke if the list contained more than 1 type, like a String and a Map. With this change, that is fixed, and it should retain any sorts that existed before.Note: Only impacts test code