Hello,
We're using API Management to wrap a SOAP (XML) based endpoint and expose JSON via a <set-body template="liquid"> policy.
Is there a way to minify the JSON in the body while keeping the policy readable?
Thank you,
Cosmin
Hello,
We're using API Management to wrap a SOAP (XML) based endpoint and expose JSON via a <set-body template="liquid"> policy.
Is there a way to minify the JSON in the body while keeping the policy readable?
Thank you,
Cosmin
@CosminStirbu-1831 You can use the set-body policies multiple times. So, after setting the body using liquid, you can add the following file to serialize it accordingly.
<set-body template="none">@(context.Response.Body.As<JObject>().ToString(Newtonsoft.Json.Formatting.None))</set-body>
7 people are following this question.