TargetParameterCountException when rendering ValueKind or JObject
See original GitHub issueHi,
Latest Scriban, this is my test code to illustrate the issue.
I’m actually doing something else, but this is the same error.
static void Main(string[] args)
{
var input = JObject.Parse("{\"name\":\"steve\"}");
var template = Scriban.Template.Parse("Hi {{name}}");
var result = template.Render(input);
Console.WriteLine(result);
}
I get this:
System.Reflection.TargetParameterCountException: ‘Parameter count mismatch.’
Am I doing something wrong here?
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
c# - TargetParameterCountException when enumerating ...
In this case, one of the string's properties is the indexer for returning the character at the specified location. Thus, when you try...
Read more >TargetParameterCountException Class (System.Reflection)
The exception that is thrown when the number of parameters for an invocation does not match the number expected. This class cannot be...
Read more >Asynchronous workflows
All parallelism is cooperative as the JavaScript runtime is single-threaded. You have to yield control inside a workflow to let other workflows execute....
Read more >Patch Notes for Odin Inspector and Serializer v2.0.16
Fixed an issue with the InfoBox attribute where referencing an instance method with a parameter would throw a TargetParameterCountException.
Read more >Client-side vs Server-side
Math in WebSharper; Rendering expressions ... TargetException; TargetInvocationException; TargetParameterCountException ... Parameters; SerializeMacro.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@NeilMacMullen something different actually (templating in office files), but I was just looking at Textrude now, I can see other uses for it!
@evolvedlight Not sure if you are trying to do the templating dynamically at runtime but for a static/compile time solution you can use my project https://github.com/NeilMacMullen/Textrude which does the model conversion for you.