I wonder if there is a way to convert json to xml. So, in my json data one of the fields has string type. It is actually xml content but represented as string in double quotes. Is there any best practice to convert/extact that field and process as xml?
ok, so, I want to convert the json message into xml so that the parse could work. Currently, in the json schema I have 3 fields: ID - int, XML - string, Modified - date. The issue is that the XML field has type string but as far as I know xml parser expects XML type and not string. This is the reason that I want to convert the string to xml type and only then apply the parsing.
I'm trying to apply xpath on the message, but somehow it doesn't extract the desired fields. Looks like it ignore what is written in xml part of the config file.
ok, so here is the complete json message with 3 fields. I want to extract XML field. You can see the content of XML field as well. I created an example.
So, after applying the config I see the same json message content. Also, is there any possibility in logstash to remove the backslashes which are there for whitespaces in my xml?
I acutally want to extract some values from [payload] : [XML]. For instance, the type and year es mentioned in previous example. I assume XPATH won't be able to extract the data directly from payload, so I need other filters perhaps?
ok, I removed the json part and now parsing the [parsedMain][payload][xml] as XML, bust somehow it ignores the xpath. I mean it doesn't extract the data from XML.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.