In this article, I would brief about achieving Liquid Template Transformation using DotLiquid in a Azure Function.
Using Azure SDK, I have create a simple HTTP Trigger function. This has two projects, LiquidTransformationApp(LiquidTransformation) and AzureFunctions.Helper.
In LiquidTransformation, we extract the request body, map name and map type from the query string and invoke utility helper for the transformation, as shown
Using Azure SDK, I have create a simple HTTP Trigger function. This has two projects, LiquidTransformationApp(LiquidTransformation) and AzureFunctions.Helper.
In LiquidTransformation, we extract the request body, map name and map type from the query string and invoke utility helper for the transformation, as shown
Here, we receive JSON request and JSON request would contain nested JObject/Array, thus to parse the JSON request as Dictionary Object, we use ParseJSONHelper and GenericInterface<T> and Generic<T> are used in Parse and Render stages of Liquid Templates to achieve support for dynamic objects.
Here are the Json To Json and Json To XML Transformation liquid templates.
Lets run and verify the Liquid Template Transformation
No comments:
Post a Comment
Note: only a member of this blog may post a comment.