TJSONObject problems

I have a problem on TJSONObject in Web Core.
If I create a TJSONObject in a function and I use TJSONObject.ToJson, the function works.
If I try to get a TJSONObject as function's result, when I use a TJSONObject.ToJson, the function go to exception.
If I try to give a TJSONObject as function's parameter, when I use a TJSONObject.ToJson, the function responses with an empty JSON Object.
I tried to use TJSObject
DemoJSONObject.zip (2.3 MB)
and get a TJSONObject as function's result. It works only for simple data. If I have a JSON Array or JSON Object nested, I can't pass they.
What is wrong?
In attach a test project.
Thanks in advance!

Stefano,
These 2 screenshots solves and kind of explains your question.


Hi Mehmet, It works.
Thanks a lot.