• Thanks for the nod Phil! Yes, I just resumed work on the CLR-based project originally inspired by your own T-SQL solution last weekend. I did initially migrate your T-SQL solution to the CLR closely maintaining your logic. Eventually, I completely re-wrote the solution from scratch and it is now available on GIT here:[/url] https://github.com/jgcoding/JSQL/[/url]

    Before posting it to GIT last weekend I had to remove some customized CLR functions I had written to serve my last employer. I did notice a casualty to a drive crash I suffered in the interim between the last revision I made to the library and the last back-up I made of the project. The last revision I made to the project included a CLR aggregate replacement for your ToJSON T-SQL solution. The CLR aggregate was incredibly simple and concise. The last version I was able to recover either is missing the last piece that set it free or I have forgotten how I implemented it to achieve full serialization of previously parsed data.

    I plan to resume reconstructing examples how I got the current ToJson CLR aggregate function to work apparently lost. Or, figuring out if the version recovered had been modified to work correctly. In the meantime, I believe your ToJson T-SQL solution while reserialize what my CLR rxJsonParser generates.

    As the function name may reveal, I use some regular expressions within a recursive function to parse any kind of json structure and any of the valid JavaScript types. I will provide more documentation to the posting as I have opportunity.

    Regards John Galt