Added JSON printing function

Prints XML as JSON to new file -- currently broken (JSON is not valid),
to be fixed later