You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Pierce Wetter (Created) (JIRA)" <ji...@apache.org> on 2011/12/08 19:37:41 UTC

[jira] [Created] (SYNAPSE-823) Support multi root json (simple fix suggested)

Support multi root json (simple fix suggested)
----------------------------------------------

                 Key: SYNAPSE-823
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-823
             Project: Synapse
          Issue Type: Improvement
          Components: Core
            Reporter: Pierce Wetter 


For rest <-> rest mediation Json is much more common lately than XML.  Unless you use binary relay, synapse mangles json with multiple roots by grabbing only the first key because XML requires a single root. While the workaround is to modify the json to have a single root if its not your API its not your choice  

It would be better to detect this case and supply an artificial root during the builder and remove it during the formatter. 

I.e. if you get json that has: roota, rootb, rootc turn this into Synapse_json_root( roota, rootb, rootc ) before translating it into XML. When converting that back to json detect the presence of synapse_json_root and restore the json to roota, rootb, rootc. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org