Jon, he's asking about YAJL (not HTTPAPI). Though, granted, to call a REST API he'd need more than just YAJL, he'd need something that does HTTP. I assume, therefore, that he has a solution for that already since he did not ask for HTTPAPI. (Or, perhaps, he's just confused?)
Rich, I don't remember if YAJL ever supported any releases earlier than 6.1? The oldest copy of YAJL that I have can be found here:
https://www.scottklement.com/yajl/mar2017/YAJL.zip I don't know if it works on 5.4, you will have to try it.
The C code in YAJL will work on older releases, but you may have to remove the RPG components and call the C code directly.
Frankly, this is only the start of your problems. The world of technology changes too rapidly to be using an operating system that is 16 years old. It simply isn't practical. Not only will you have a hard time finding software that is supported on such an ancient beast, but the huge security risks of running something that is so far out of date make it very risky.
If your company (or is this a client?) doesn't want to invest in a new machine, they should consider moving to the cloud. You can get an up-to-date IBM i partition on cloud hosts like Connectria, iInTheCloud, or IBM that you can pay for on a monthly basis.
That said -- if you want to try the old version of YAJL, or to call the C code directly, or to rewrite the RPG bits for older releases, you are welcome to. To me it seems like a colossal waste of time and money, and in the end you'll end up with something that has big security risks and is unsupported. It's very difficult to see why someone would do that in today's age.