@Test void span_specialCharsInJson() {
    // service name is surrounded by control characters
    Endpoint e = Endpoint.newBuilder().serviceName(new String(new char[] {0, 'a', 1})).build();
    Span worstSpanInTheWorld =
      Span.newBuilder()
        .traceId("1")
        .id("1")
        // name is terrible
        .name(new String(new char[] {'"', '\\', '\t', '\b', '\n', '\r', '\f'}))
        .localEndpoint(e)
        // annotation value includes some json newline characters
        .addAnnotation(1L, "\u2028 and \u2029")
        // binary annotation key includes a quote and value newlines
        .putTag(
          "\"foo",
          "Database error: ORA-00942:\u2028 and \u2029 table or view does not exist\n")
        .build();

    assertThat(
      parse(SPAN_PARSER, new String(SpanBytesEncoder.JSON_V2.encode(worstSpanInTheWorld), UTF_8)))
      .isEqualTo(worstSpanInTheWorld);
  }
This isn't a test of what we "should" accept as a span, rather that characters that trip-up
json don't fail in SPAN_PARSER.
zipkin-storage/elasticsearch/src/test/java/zipkin2/elasticsearch/JsonSerializersTest.java