Merged
Conversation
Add require spec_helper in rspec file Add spec
Contributor
Author
|
@LeFnord If you want to take a look :) |
LeFnord
reviewed
May 8, 2024
Member
LeFnord
left a comment
There was a problem hiding this comment.
thanks @ericproulx … only one question
numbata
added a commit
that referenced
this pull request
Apr 15, 2026
numbata
pushed a commit
that referenced
this pull request
Apr 16, 2026
The constant was copied over from grape when grape_entity/json.rb was introduced, but grape-entity never parses JSON and so never used it. Because the main grape gem also defines JSON::ParseError, loading both gems produced `already initialized constant` warnings. Dropping the assignment silences the warnings with no behavior change. Originally flagged in #385 by @ericproulx.
numbata
added a commit
that referenced
this pull request
Apr 17, 2026
PR #385 replaced MultiJson.dump with JSON.dump which bypasses ActiveSupport's Hash#to_json override, causing Time values to serialize as "2026-04-16 10:55:10 UTC" instead of ISO 8601. Restore direct multi_json dependency and MultiJson.dump call. Remove the intermediate Grape::Entity::Json constant introduced by #385 as it is no longer needed. Fixes #403
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a
Grape::Entity::Jsonclass that will usemultijsonif already loaded instead of the defaultjson.A spec has been added to make sure
to_jsonstill works and movedrequire 'spec_helper'in.rspecfile