See below:
[subbu@earth:~/work/wmf/parsoid] cat /tmp/html <span typeof="mw:Transclusion" data-mw="{"parts":[{"template":{"target":{"href":"Template:Small","wt":"Small"},"params":{"1":{"wt":"<span style=\"color:green\">green span text</span>"}}}}]}"></span> [subbu@earth:~/work/wmf/parsoid] php bin/parse.php --html2wt < /tmp/html {{Small|<span style="color:green">green span text</span>}}