more robust instrumentation_as_json

1) If input data contains heavy Unicode, export() will not fail.
2) Exported string will be reliably a str, UTF-8 encoded