Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

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?

<instrument-list>{"type":[{"name":"acoustic","instrument":[{"name":"GUITAR"},{"name":"VIOLIN"}]},{"name":"electronic","instrument":[{"name":"GUITAR"},{"name":"VIOLIN"}]}]}</instrument-list>

Thanks,

Sachin

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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.

0
Comments on this Answer
Comment made 13-Feb-2018 by sachin 264

Thanks Daniel.

0