Forum Discussion

sachin_80710's avatar
sachin_80710
Icon for Nimbostratus rankNimbostratus
Feb 12, 2018

JSON profile for 'JSON inside XML'

Hi,

 

Is it possible to learn JSON element from 'JSON inside XML', our application has JSON as XML element value. example : In below example we have parameter and its value is XML data, for this we have assigned XML profile to parameter; but inside XML element there is one element that is having JSON data as its value. due to this XML profile for this parameter triggers meta-character value like { , : etc which is used to define JSON object.

 

Is there any way to learn that JSON data is being sent inside XML elements?

 

{"type":[{"name":"acoustic","instrument":[{"name":"GUITAR"},{"name":"VIOLIN"}]},{"name":"electronic","instrument":[{"name":"GUITAR"},{"name":"VIOLIN"}]}]}

 

Thanks,

 

Sachin

 

1 Reply

  • I think your only option is to try to enforce a XML profile there. There is not option to nest a content profile in the way you need. Anyway a proper XML can still add good protection there, you can enforce a XML schema to verify that the format of you JSON element follow the rules of its definition.