Inconsistent return values


ddelapasse@...
 

Hi,

I'm relatively new to ironpython and trying to understand my options for returning values back to my C# app.  Can someone explain why option 1 returns fine, but option 2 returns null.   Trying to allow my web app users to code up some "formulas" (basic logic) and this seems like a great option, but I need to understand "the rules".   The responses will be sometimes text and sometimes numeric so wrapping in json.dumps seems like a good plan.

Thanks!!!
Deanna

-------- option 1 (returns "last line") ----------
import json
json.dumps("last line")

---------    option 2 (returns null)     -----------
import json
if True==True:
   json.dumps("true!!!")
else:
   json.dumps("false!!!")


Join users@ironpython.groups.io to automatically receive all group messages.