According to documentation
Binding formatted data from the request body
There can be at most one parameter per action decorated with
[FromBody]
. The ASP.NET Core MVC run-time delegates the
responsibility of reading the request stream to the formatter. Once
the request stream is read for a parameter, it's generally not
possible to read the request stream again for binding other
[FromBody]
parameters.
(emphasis mine)
So the first parameter will get populated from the body but the second wont as the stream has already been read.
I would suggest creating a model to hold all the information to be passed to the action...
public class JsonModel {
public string json { get; set;}
public string shortJson { get; set;}
}
...and use that for the action parameter
[HttpPost("testy")]
public IActionResult testyJson([FromBody]JsonModel model) {
var json = model.json;
var shortJson = model.shortJson;
dynamic o = MyModule.replaceInJson(json, shortJson);
return Ok();
}