```ruby
require "json"

module SimpleQueues
  class JsonEncoder
    def encode(message)
      JSON.generate(message)
    end

    def decode(message)
      JSON.parse(message)
    end
  end
end
```

Fix 'NoMethodError merge for JSON::Ext::Generator::State'
user
```ruby
require "json"

module SimpleQueues
  class JsonEncoder
    def encode(message)
      message.to_json
    end

    def decode(message)
      JSON.parse(message)
    end
  end
end
```
assistant