我遇到了一个场景,我会得到很多 form.io 基于Javasrcipt 的 JSON 对象, >控制器。我如何生成C#类,以便可以 strong键入?
JavaScript类:
export default class SomeComponent {
static schema(...sources) {
return _.merge({
/**
* Determines if this component provides an input.
*/
input: true,
/**
* The data key for this component (how the data is stored in the database).
*/
key: '',
...
}
转到控制器的JSON对象:
{
"input":true,
"key":"inputElement"
}
接收以下内容的控制器:
public IActionResult Receiver(???) // strongly typed for many kinds of JSON?
{
return View();
}