I would like to find a way to use phpdoc2 to parse PHP projects into JSON rather than into Abstract Syntax Tree XML. Although of course I could just parse the XML into JSON, it seems that creating XML would be unnecessary overhead here.
So, in a nut shell, the question is: is there an easy way to configure phpdoc2's parser to directly produce JSON instead of XML? Or maybe some clues on what to extend in phpdoc2 to route the parsing output into JSON?
The story behind this question is: I would like to create JSDuck-like documentation for my PHP project. Although I have found that JSDuck can be used with PHP projects I won't go that way for the two reasons:
- Don't want to part with phpdoc comments in my PHP classes or add something JSDuck-specific in there;
- Don't really need the whole JSDuck doc interface as I am going to create a very custom one myself;
- Prefer a PHP solution.