| 553 | } |
| 554 | |
| 555 | void write_string(const string_view_type& sv, semantic_tag tag, const ser_context&, std::error_code&) |
| 556 | { |
| 557 | if (JSONCONS_LIKELY(tag == semantic_tag::noesc && !options_.escape_all_non_ascii() && !options_.escape_solidus())) |
| 558 | { |
| 559 | //std::cout << "noesc\n"; |
| 560 | sink_.push_back('\"'); |
| 561 | sink_.append(sv.data(), sv.length()); |
| 562 | sink_.push_back('\"'); |
| 563 | column_ += (sv.length()+2); |
| 564 | } |
| 565 | else if (tag == semantic_tag::bigint) |
| 566 | { |
| 567 | write_bignum_value(sv); |
| 568 | } |
| 569 | else if (tag == semantic_tag::bigdec && options_.bignum_format() == bignum_format_kind::raw) |
| 570 | { |
| 571 | write_bignum_value(sv); |
| 572 | } |
| 573 | else |
| 574 | { |
| 575 | //if (tag != semantic_tag::bigdec) |
| 576 | // std::cout << "esc\n"; |
| 577 | sink_.push_back('\"'); |
| 578 | std::size_t length = jsoncons::detail::escape_string(sv.data(), sv.length(),options_.escape_all_non_ascii(),options_.escape_solidus(),sink_); |
| 579 | sink_.push_back('\"'); |
| 580 | column_ += (length+2); |
| 581 | } |
| 582 | } |
| 583 | |
| 584 | JSONCONS_VISITOR_RETURN_TYPE visit_byte_string(const byte_string_view& b, |
| 585 | semantic_tag tag, |
no test coverage detected