Custom JavaFunctionProvider returning a context

I am using the DMN FEEL Scala engine. I need to create a custom function (in Java, Function Provider SPI | FEEL-Scala (camunda.github.io)) that returns a context ( Data Types | FEEL-Scala (camunda.github.io)) - basically what would constitute a JSON object. Is there a way to achieve it?