Hi,
I need preporcess json payload on API call request, eg remove prefixes in name properties on json objects:
{ foo.bar.item: "value" }
to
{ item: "value" }
I need do this because not all API users can send data in required format. Can that be done within ANZ or that shold be done with ASP.NET Core only? I guess that can be done with middleware, I will very appreciate if you will show example
Thanks
4 Answer(s)
-
0
A;so preprocessing should be done not for all API of the host, only for exact services and much better for exact paths
-
0
Just want to specify my request. JSON should be (if possible) be processed not in request (I mean modyfing request body), but somewhere on upper lever like validation works.
-
0
Hi @peopleteq
Yes, you can do it by writing a custom AspNet Core middleware. Just be sure that, you add that middleware before the ones who needs the modified json format.
-
0
Thanks!