Changes

Jump to: navigation, search

JSON Integration Adapter

923 bytes added, 09:49, 23 June 2011
m
Technical Notes
...
</pre>
 
NOTE: THE MESSAGE PARAMETER DOES NOT CONTAIN THE MESSAGE VALUES. THE MESSAGE PARAMETER CONTAINS THE MESSAGE METADATA. THE TRANSFER OBJECT CONTAINS THE MESSAGE VALUES WHICH MUST BE VALIDATED AGAINST THE MESSAGE TO ENSURE CORRECT FORMAT.
MessagePart.java - Parts of a message. Messages can contain values or other messages.
JSONMessageParser - Used to turn JSON into a message.
 
format(TransferObject tobj, Message message, Output out)
Algorithm for format method is as follows
1. Retrieve the root of the message
2. Iterate through each of the parts of the root
2.1 If the part is a CompositeMessagePartInstance, it is a message node
2.2 If the part is a PrimitiveMessagePart, it is a value node
2.3 Validate the part against the MessagePartMapping. Different types of validation must be done if the part is a Composite versus if it is a Primitive.
2.4 If the part is a CompositeMessagePartInstance, recursively call the format method with TransferObject set to the part.
2.4 If the part is a PrimitiveMessagePart, write the message part to the output.
== Resources ==
1
edit

Navigation menu