Class JsonTransformRouteDefinitionExtensions
DSL of the JSON transform step. A string argument is a locator (file relative to
, or assembly:Name/path); an inline
specification is TextSource.Inline("...").
.TransformJson("Transforms/order-to-shipment.jsonata")
.TransformJson(TextSource.Inline("{ 'id': orderId, 'to': { 'city': address.city }, 'tenant': $headers.tenant }"))
.TransformJson("Transforms/x.jsonata", JsonTransformOutput.Node)
public static class JsonTransformRouteDefinitionExtensions
Inheritance
Methods
AddJsonTransform(IServiceCollection, Action<JsonTransformOptions>?)
DI registration: services.AddJsonTransform(o => o.BaseDirectory = "/etc/acme/transforms").
public static IServiceCollection AddJsonTransform(this IServiceCollection services, Action<JsonTransformOptions>? configure = null)
TransformJson(IRouteDefinition, string, JsonTransformOutput)
Applies the JSONata specification at locator to the JSON body.
public static IRouteDefinition TransformJson(this IRouteDefinition route, string locator, JsonTransformOutput output = JsonTransformOutput.String)
TransformJson(IRouteDefinition, TextSource, JsonTransformOutput)
Applies the JSONata specification to the JSON body.
public static IRouteDefinition TransformJson(this IRouteDefinition route, TextSource specification, JsonTransformOutput output = JsonTransformOutput.String)
UseJsonTransform(IRouteContext, Action<JsonTransformOptions>?)
Registration on a context built without DI: context.UseJsonTransform(o => o.Indent = true).
public static IRouteContext UseJsonTransform(this IRouteContext context, Action<JsonTransformOptions>? configure = null)