MultiJson.encode is deprecated.
Change to MultiJson.dump