add json output; add language field and adjust parsing for it.