Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't specify behavior not supported by gson
- Loading branch information
Showing
1 changed file
with
0 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db0d880
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.
Shouldn't we skip this test only for gson? Or if we do not guarantee
to_json
to work across other adapters, we could remove some code from ok_json adapter, since it has a special case forto_json
.db0d880
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.
The whole point of MultiJSON is guaranteeing the same behavior across all adapters. This means we can't support behavior that isn't supported by all adapters. I'm okay with providing
to_json
as part ofok_json
but we shouldn't specify that behavior if we can't guarantee it.db0d880
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.
Ok, I'll prepare another pull-request removing redundant parts from ok_json adapter later today then.
db0d880
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.
You've convinced me to reverse my opinion on this. I'll add back this spec and wrap it with
unless adapter == 'gson'
.