XML to JSON

JSON is the first mp3tag proper WSS parser.
I managed to convert XML to JSON by only using regular expressions.
It covers all complex structures, attributes, comments, CDATA, namespaces.
And yes, it is written from scratch.
One thing convertor cannot know is if XML tags with single appearance are subject to array.

<disc number="1">
<track number="1">Innuendo</track>
<track number="2">One vision</track>
</disc>

Both disc and track are array elements but only track appears multiple times.
There is a solution for this:

  1. Convert everything to array
  2. Pass the script the list of array tags
XML to JSON conversion cannot be used yet - JSON mode parses only the original stream - but hopefully it will be soon available (Florian, I am patient :wink:).

I attach two pairs of XML-JSON files (pretty printer applied to all 4 files in notepad++).

Queen_Platinum_Collection.xml (9.73 KB)

Pink_Floyd_Discovery.xml (30 KB)

Queen_Platinum_Collection.json.txt (14.4 KB)

Pink_Floyd_Discovery.json.txt (50.9 KB)

QUOTE (Victor Kostas @ Nov 7 2014, 19:57) <{POST_SNAPBACK}>
JSON is the first mp3tag proper WSS parser.

I managed to convert XML to JSON by only using regular expressions.
It covers all complex structures, attributes, comments, CDATA, namespaces.
And yes, it is written from scratch.
One thing converter cannot know is if XML tags with single appearance are subject to array.

<disc number="1">
<track number="1">Innuendo</track>
<track number="2">One vision</track>
</disc>

Both disc and track are array elements but only track appears multiple times.
There is a solution for this:

  1. Convert everything to array
  2. Pass the script the list of array tags
XML to JSON conversion cannot be used yet - JSON mode parses only the original stream - but hopefully it will be soon available (Florian, I am patient :wink:).

I attach two pairs of XML-JSON files (pretty printer applied to all 4 files in notepad++).


Is it that difficult to implement this request? Use current stream when switching to JSON mode.
XML stream is converted to JSON but command JSON "on" parses the original (xml) stream.
It looks simple change but either forum emails do not reach or touch Florian....

It's really a pity I have spent a huge effort to convert XML to JSON and it cannot be used in WS. :wacko:

JSON "ON" should parse the current stream. Now it does always parse the original.2
Is it difficult to implement this feature? Waiting 18 months now!!!!!!!!!!!!!!!!