nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thad Guidry <thadgui...@gmail.com>
Subject Re: Which processor to use to cleanly convert xml to json?
Date Wed, 01 Jun 2016 19:14:32 GMT
Keith,

Hopefully you are aware of some of the pitfalls that you might run into
with that approach.  But it might be good enough for your particular use
case :)

>From org.json.XML

Convert a well-formed (but not necessarily valid) XML string into a
JSONObject. Some information may be lost in this transformation because
JSON is a data format and XML is a document format. XML uses elements,
attributes, and content text, while JSON uses unordered collections of
name/value pairs and arrays of values. JSON does not does not like to
distinguish between elements and attributes. Sequences of similar elements
are represented as JSONArrays. Content text may be placed in a "content"
member. Comments, prologs, DTDs, and <[ [ ]]> are ignored.

Thad
+ThadGuidry <https://www.google.com/+ThadGuidry>

Mime
View raw message