Using Custom Loader (2.0.1)

I am using Ansible 2 API to execute playbooks.
For vars files, I needed to use inheritance in json, so I built a reference system in json and written a decoder in python. My decoder works with both ordinary json files and my custom files.

I just want to be able to use my decoder for loading vars files. Unfortunately the only solution I found is to create my own loader class and use it via Ansible API.

Is there any solution besides hacking the loader??