mustache-sharp
mustache-sharp copied to clipboard
IF does not work when using JOject
When passing a JOBject in to Generator.Render the IF clause does not get evaluated. The ability to pass JObect to render is really useful because it allows us to pass dynamic data payloads without concrete mapping.
I'm facing the same problem right now
Unfortunately this would cause a hard dependency on Newtonsoft Json net.
Have you considered converting JObject to a dynamic, eventually getting an actual System.Dynamic.ExpandoObject? I don't specifically remember exactly what to do but the JSON Net library can make that conversion. I believe it might flatten the hierarchy though.
Sorry, I just realized #78 will prevent you from using dynamic/Expando since the library doesn't understand dynamic objects.