MCPcopy Create free account
hub / github.com/danielaparker/jsoncons / visit_null

Function visit_null

include/jsoncons/json_encoder.hpp:514–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512 }
513
514 JSONCONS_VISITOR_RETURN_TYPE visit_null(semantic_tag, const ser_context&, std::error_code&) final
515 {
516 if (!stack_.empty())
517 {
518 if (stack_.back().is_array())
519 {
520 begin_scalar_value();
521 }
522 if (!stack_.back().is_multi_line() && column_ >= options_.line_length_limit())
523 {
524 break_line();
525 }
526 }
527
528 sink_.append(null_literal().data(), null_literal().size());
529 column_ += null_literal().size();
530
531 end_value();
532 JSONCONS_VISITOR_RETURN;
533 }
534
535 JSONCONS_VISITOR_RETURN_TYPE visit_string(const string_view_type& sv, semantic_tag tag, const ser_context& context, std::error_code& ec) final
536 {

Callers 2

null_valueMethod · 0.70
null_valueMethod · 0.70

Calls 14

begin_scalar_valueFunction · 0.85
break_lineFunction · 0.85
is_multi_lineMethod · 0.80
line_length_limitMethod · 0.80
end_valueFunction · 0.70
emptyMethod · 0.45
is_arrayMethod · 0.45
backMethod · 0.45
appendMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected