The JSON transformer linkable interface DFHJSON is a
CICS-supplied program that can be
called to perform transformation between application data and JSON. Your
application program can
transform JSON to application data by linking to DFHJSON.
Before you begin
You must have an enabled JSONTRANSFRM resource that defines the JSON
binding and
JSON schema. If you intend to perform transformations by using
Java™
, you must have an Axis2 JVM server already running.
About this task
Create or update an application program to link to the
CICS®
supplied program DFHJSON to do the transformation.
Procedure
- Create a channel, for example
MyChannelName
,
and put the following containers into the channel.
- DFHJSON-JSON
- DFHJSON-TRANSFRM
- DFHJSON-JVMSERVR
For more information about these containers, see
JSON transformer linkable interface containers
.
- Use the
EXEC CICS LINK PROGRAM
API command to
transform the data to JSON:
EXEC CICS LINK PROGRAM('DFHJSON') CHANNEL('MyChannelName')
- Install the application program.
Results
When the application runs the
LINK PROGRAM
command,
CICS
checks the JSONTRANSFRM resource
to find the mappings in the JSON binding and transforms the JSON to
the application data using the containers on the channel. The
application
data is placed in the DFHJSON-DATA bit container on return.
What to do next
You can also use the same mappings to transform application
data to JSON. For more information, see
Transforming application data to JSON by linking to DFHJSON.