Commit graph

3 commits

Author SHA1 Message Date
Craig Fowler 4b5d86135d Follow-up #761 - Fix for recursive case
Unfortunately Jint still chokes in this case if the expando contains
further nested expandos.  It turns out that I need to do this
recursively for it to always work.

We also have trouble with IEnumerable types.  They also can't be
round-tripped from/to JSON when they aren't deserialized as a very
specific type.
2021-04-01 20:25:09 +02:00
Craig Fowler 7ed875e53c Resolve #761 - Add special-case for ExpandoObject
It appears that this can be fixed by intercepting occasions
when Jint returns an ExpandoObject but the desired return type
is simply object.  In this scenario we must return
a Dictionary<string,object> instead of a simple object, or else
Jint freaks out should we try to stringify it later.

I also added a second test to prove that making this change hasn't
broken the way we expect Jint to work for us.
2021-04-01 20:25:09 +02:00
Craig Fowler dd9c1f5cdc WIP #761 - Unit test indicates location of problem
This unit test narrows the problem down to the class
JavaScriptService.
2021-04-01 20:25:09 +02:00