If you want to serialize some C# code cross-compile it from .NET to JavaScript, pass it to a JavaScript server as a string inside a JSON data packet then unpack it and run on the server (inject code generated by client (unprotected) to the server processing pipeline) then there is something wrong in the design.
1st obstacle will be that Node.js server understands JavaScript while the code snippet you want to send is written in C#
I recommend you to re-thing the design, inspect some web resources for the typical client-server scenarios.
If you are not happy with REST-style API then you can consider using JSON-RPC.
Some older Stack Overflow discussion about which one is "better" is available at REST vs JSON-RPC?. You can find some of the linked and related questions useful