You're right -- you could write your own script that takes records and dumps them out as JSON.
However, that's the point of the module -- it prevents you from having to write and maintain this yourself.
The logstash_formatter package coerces everything to strings, does some date handling, and catches an error in the case that the source host is empty. The module coerces and converts your log file and the logstash agent is concerned with shipping it. You could tell your shipper to filter out some tags or only send some events.
Take a look at the module itself by downloading it from the Package Index -- as of this writing, it's 154 lines and well commented.