The json filter will parse all of the nested JSON objects and create hashes from them. The json filter parses a string, which is why you get that error about casting a RubyHash to a RubyIO.
If you want to move the nested objects to the top level and you know their names you can use code like this.