/** * THIS IS FOR DEBUGGING AND TESTING ONLY! * DON'T USE THIS IN HAPPY-PATH, PRODUCTION CODE. * * @return Json representation of this telemetry item. */ @Override public String toString() { StringWriter sw = new StringWriter(); try { JsonTelemetryDataSerializer jtds = new JsonTelemetryDataSerializer(sw); this.serialize(jtds); jtds.close(); return sw.toString(); } catch (IOException e) { // shouldn't happen with a string writer throw new RuntimeException("Error serializing "+this.getClass().getSimpleName()+" toString", e); } }