Last modified by Erik Bakker on 2024/09/09 12:46

From version 32.2
edited by eMagiz
on 2022/06/13 15:15
Change comment: Update document after refactoring.
To version 33.1
edited by Erik Bakker
on 2022/06/13 15:17
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.marijn
1 +XWiki.ebakker
Content
... ... @@ -1,13 +1,6 @@
1 -{{html wiki="true"}}
2 -<div class="ez-academy">
3 - <div class="ez-academy_body">
1 +{{container}}{{container layoutStyle="columns"}}(((
2 += JSON Related Transformations =
4 4  
5 -<div class="doc">
6 -
7 -
8 -
9 -= Migration Path * JSON Related Transformations =
10 -
11 11  Within eMagiz, you have the option to transform messages from JSON to XML, XML to JSON, and from JSON to JSON. In all these scenarios, you had to resort to using at least a custom XSLT, sometimes even in combination with standard components provided by eMagiz. With the new functionality, it has become possible to define what the input and output of a message transformation are and have the option to interpret the input against which can be validated.
12 12  
13 13  Should you have any questions, please get in touch with academy@emagiz.com.
... ... @@ -24,15 +24,13 @@
24 24  
25 25  * The new approach allows you to use the transformation tooling in Design to create your mapping from JSON to XML
26 26  
20 +== 3. SON Related Transformations ==
27 27  
28 -
29 -== 3. Migration Path * JSON Related Transformations ==
30 -
31 31  === 3.1 Legacy approach ===
32 32  
33 33  In the Legacy situation, you need to have at least one custom XSLT to transform between JSON and XML (or JSON). A classic example of converting from JSON to XML looks as follows.
34 34  
35 -<p align="center">[[image:migration-path-json-related-transformations--json-to-xml-transformation-legacy.png||]]</p>
26 +[[image:Main.Images.Migrationpath.WebHome@migration-path-json-related-transformations--json-to-xml-transformation-legacy.png]]
36 36  
37 37  Here you would use the standard component to transform from JSON to XML followed by a standardized XSLT available through the store. A similar setup was needed when converting XML to JSON.
38 38  
... ... @@ -40,7 +40,7 @@
40 40  
41 41  In the new situation, you can start your work in Design as you do when transforming XML to XML. The same can now be done with JSON to XML transformations. Note that the definition should have an additional root element (by default, eMagiz calls the element root) to make the validation and transformation work as it should be. After setting your system message and message mapping as you are just to, you can navigate to Create and build the flow. Then, within the flow, some minor changes are needed. See below for a representation of how this looks in Create.
42 42  
43 -<p align="center">[[image:migration-path-json-related-transformations--json-to-xml-transformation-support-objects.png||]]</p>
34 +[[image:Main.Images.Migrationpath.WebHome@migration-path-json-related-transformations--json-to-xml-transformation-support-objects.png]]
44 44  
45 45  === 3.3 How to get to the new approach ===
46 46  
... ... @@ -66,7 +66,7 @@
66 66   o In an asynchronous offramp, no validations need to be changed because you validate the CDM, which is still based on XML.
67 67   o This logic applies the same for other asynchronous and synchronous flows.
68 68  13. If the answer is yes for the flow you are currently editing, you should add a JSON source factory support object and couple this to the validation. See below for how this looks
69 -<p align="center">[[image:migration-path-json-related-transformations--JSON-to-XML-transformation-add-support-objects.png||]]</p>
60 +[[image:Main.Images.Migrationpath.WebHome@migration-path-json-related-transformations--JSON-to-XML-transformation-add-support-objects.png]]
70 70  14. Determine whether any transformation component in your flow has a JSON message. For example:
71 71   a) In an asynchronous onramp, this would be the standard transformation based on your message mapping made in Design
72 72   b) In an asynchronous offramp, no transformation will have JSON as input because here you transform message from CDM to system message and the CDM and that is still based on XML.
... ... @@ -76,11 +76,11 @@
76 76   b) If the output is XML, you must add one support object. This support object is called the result to string transformer. See step 17 for more details
77 77  16. Couple the just created support objects to your transformation as shown below
78 78  
79 -<p align="center">[[image:migration-path-json-related-transformations--json-to-xml-transformation-link-support-objects.png||]]</p>
70 +[[image:Main.Images.Migrationpath.WebHome@migration-path-json-related-transformations--json-to-xml-transformation-link-support-objects.png]]
80 80  
81 81  Congratulations, you have successfully migrated your current flow to transform JSON message 17. Couple the just created support object to your transformation as shown below
82 82  
83 -<p align="center">[[image:migration-path-json-related-transformations--json-to-xml-transformation-link-support-objects-xml.png||]]</p>
74 +[[image:Main.Images.Migrationpath.WebHome@migration-path-json-related-transformations--json-to-xml-transformation-link-support-objects-xml.png]]
84 84  
85 85  Congratulations, you have successfully migrated your current flow to transform JSON message.
86 86  
... ... @@ -90,8 +90,4 @@
90 90  
91 91  * The new approach allows you to use the transformation tooling in Design to create your mapping from JSON to XML
92 92  
93 -</div>
94 -</div>
95 -</div>
96 -
97 -{{/html}}
84 +)))((({{toc/}}))){{/container}}{{/container}}