-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PropertyNamingPolicy != CamelCase prevents script execution #199
Comments
Analyzing with Wireshark, I saw that POST request contains moduleSourceType, moduleSource and args fields when PropertyNamingPolicy == CamelCase, and it works. |
Seems I am running into the same issue. Did you find a solution? I'm currently wondering if I can serialize the object and pass it in as a string to work around this issue. |
I did explicit conversion using a DefaultJsonTypeInfoResolver, adding a Modifier, and in its callback I wrote something like
because I need it only for certain objects. Perhaps it could be possible to hack library field names, but I did not think about this possibility until now. |
I might need to look into that. For now I just went ahead and passed in a string bypassing all of the serialization and then calling JSON.parse on the other side as the object going in is complex but I just need rendered html returned as a string. |
Hello, thank you for your excellent library.
I encountered an issue (I searched for an issue on this argument, but I did not find anything, forgive me if my failure)
It seems that configuring JsonService to serialize object properties with a rule different from CamelCase, javascript module cannot be executed.
Executing following code (substantially static API example with JsonService settings) throws a Jering.Javascript.NodeJS.InvocationException: Invalid module source type: undefined.
If PropertyNamingPolicy == JsonNamingPolicy.CamelCase it works regularily, with other values for PropertyNamingPolicy (SnakeCase* or KebabCase*) it throws Jering.Javascript.NodeJS.InvocationException: Unexpected error
Jering library version 7.0.0, .NET 8, nodeJs 20.10.0
The text was updated successfully, but these errors were encountered: