Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Overview

JSONMapping Handler is a FIXEdge plugin that implements FIX-to-JSON and JSON-to-FIX encoding according to the FIX standard.

Handler functions

JSONMapping Handler performs the following functions:

  • Convert any FIX message to XML message (MsgType = n) containing JSON object
  • Convert XML message (MsgType = n) containing JSON object to FIX format

Configuration parameters

The handler is configured as part of the business logic in BL_Config.xml, along with other FIXEdge handlers.

The table below represents the JSONMapping Handler config parameters.

Property name

Description

Required

Common BL handlers configuration parameters

Name

Reference name used in the Business Logic Actions.

Example: JSONMapping

Y

Description

A description defined by a user.

Example: JSONMapping Handler

Y

DllName 

Path to a library, starting from RootDir.

Example: ./libJSONMapping.so

Y

VerifyHandlersVersion

If set to "true" FIXEdge C++ prevents the use of an unexpected version of the module in order to avoid incompatible changes between two different FIXEdge C++ versions.

The recommended value is "true".

If the version of the handler is different from the FIXEdge C++ version, the module will not be loaded and the corresponding error will be logged.

N

Specific JSONMapping Handler configuration parameters

Direction

The direction of the conversion.

Valid values: FIX-to-JSON | JSON-to-FIX

Y

FIXVersion

The FIX version of the message.

If provided for FIX-to-JSON conversion, it specifies the version of the FIX message to use instead of the version of the source message.

If the FIXVersion parameter is defined but the ParserVersion parameter is not defined then the parser of the JSON message will be used.

N

ParserVersion

The name of the parser (with @) or parser template string. 

If the ParserVersion parameter is defined but the FIXVersion parameter is not defined then the default FIX version will be used.

N

MessageType

MsgType of the encoded message. Applicable only to FIX-to-JSON encoding.

Valid values: any MsgType value

The default value: n


FieldTag

Valid values: any tag number

The default value: 213

N

IncludeCustomTags

Valid values: true | false

The default value: false

N

FIX-to-JSON conversion

JSONMapping Handler converts any FIX message to XML message (MsgType = n) containing JSON object.

BL Rule Sample

BL_Config.xml
<FIXEdge>
	<BusinessLayer>
		<!-- Rule for status messages -->
		<!-- Rule messages from Simple Client -->
		<Rule>
			<Source>
				<FixSession SenderCompID="TESTI" TargetCompID="TESTA"/>
			</Source>
			<Action>
			    <HandlerAction Name="JSONMapping" Direction="FIX-to-JSON" FieldTag="22222"/>
				<Send>
					<FixSession SenderCompID="TESTA" TargetCompID="TESTI"/>
				</Send>
			</Action>
		</Rule>
		<DefaultRule>
			<Action>
				<DoNothing/>
			</Action>
		</DefaultRule>

	</BusinessLayer>
</FIXEdge>

Input Message Sample

8=FIX.4.4|9=91|35=W|49=TESTI|56=TESTA|34=2|52=20030204-09:25:43|55=TESTA|268=2|269=4|270=11|10=064

Output message sample

JSON-to-FIX conversion


  • No labels