I came across How to convert XML to JSON in ASP.NET C# (link) and one in javascript (at goessner.net/download/prj/jsonxml/). But have yet to find one in c++ that takes just a st
Please head to http://json.org. You may find something of interest there. It lists many libraries available for JSON processing in C++ and many other languages.
But for the thing you linked to [pdhcc] you may have to do some work yourself to port it to C++.