web stats
json schema parsing for jsonrpc messages - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 05-20-2017, 07:18 AM
sBham sBham is offline
Mirth Newb
Join Date: Feb 2017
Posts: 6
sBham is on a distinguished road
Default json schema parsing for jsonrpc messages

Hey there,

I was wondering what the community would recomment for efficiently validating json messages that I was provided json schema for. (it seems like json schema is almost like the usual equivalent in XML world).

In this case the implementation is both http and channel listners and the goal is to validate the json payload at the source filters using either: filter steps, a custom java jar that would expose a json schema parsing method to validate a message against its corresponding scheam. Or some type of javascript library at the transformation?

In this case we are talking about close to 100 different message contracts/format I was given (and same for response). So implemeting filters for each field might be a daunting task especially if I was given the json schema for each request and response. there are libraries out there that would validate a json document against a json schema (just like we have in XML world)

In either java or node.js I would have used one of the json schema libraries available (http://json-schema.org/implementations#validator-java). However before I start validation work, I would like to query the community and support for what would be the recommended most efficient ways or alternative solutions.

Format/schema of request json payload:

{"method": "methodName",
"id": "arbitrary-something",
"params": [arg1, arg2, ...]}

Format/schema of response json payload:

{"result": the_result,
"error": null,
"id": "arbitrary-something"}

Mirth connect 3.5 (and final solution to be ultimately deployed on an appliance)

Reply With Quote

json, postgres, rpc, schema

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 12:49 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation