Just got the need to use the SPXmlToJson() utility introduced with 0.7.1 and got stuck trying to make it work... I kept reading the documentation (including copy & Paste of the example there) and re-checking my code until I finally dove into the source
As defined, this utility will return an array of empty objects if no input parameters are defined. The documentation says the following should work (and in my assumption, it should have returned an equivalent of the xml node):
But I kept getting an array with empty objects. I had to set the 'includeAllAttrs' to true in order to have it turn data in the objects.
In reading the documentation, it is not clear that the default input parameters will actually return nothing. I would have expected that 'includeAllAttrs' would default to true. The 'mapping' option is also not clear. Initially I thought it was
just a mechanism for renaming the attributes and setting their value's data type, but I think it is first and foremost a filter on what actually is returned.
Should the documentation be updated?
Ps. Sorry I did not give you feedback on this utility back when you initially introduced it in Beta.