You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: second_level_parse_json.rb
    path of file: ./repos/her/lib/her/middleware
    
    the code of the file until where you have to start completion: module Her
  module Middleware
    # This middleware expects the resource/collection data to be 
    
      def on_complete(env)
        env[:body] = case env[:status]
                     when 204
                       parse('{}')
                     else
                       parse(env[:body])
                     end