intridea/grape — pull request #181 by benrosenblum (2012-06-04 19:42:57+00:00)
Title: Fix json serialization of nested hash when using root elements with a Grape::Entity presenter

...th an Entity.

Previously, when a root element is used with an Entity, the presenter
wraps the array of Entity object in a plain hash, and the Entities end
up serialized as plain strings of the class name
(i.e., {"root":["#","#"])

The new code recursively checks for any elements of the hash that respond
to serializable_hash and calls it if present.