! @return whether array creation completed */
| 9688 | @return whether array creation completed |
| 9689 | */ |
| 9690 | bool get_ubjson_array() |
| 9691 | { |
| 9692 | std::pair<std::size_t, char_int_type> size_and_type; |
| 9693 | if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type))) |
| 9694 | { |
| 9695 | return false; |
| 9696 | } |
| 9697 | |
| 9698 | if (size_and_type.first != string_t::npos) |
| 9699 | { |
| 9700 | if (JSON_HEDLEY_UNLIKELY(!sax->start_array(size_and_type.first))) |
| 9701 | { |
| 9702 | return false; |
| 9703 | } |
| 9704 | |
| 9705 | if (size_and_type.second != 0) |
| 9706 | { |
| 9707 | if (size_and_type.second != 'N') |
| 9708 | { |
| 9709 | for (std::size_t i = 0; i < size_and_type.first; ++i) |
| 9710 | { |
| 9711 | if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second))) |
| 9712 | { |
| 9713 | return false; |
| 9714 | } |
| 9715 | } |
| 9716 | } |
| 9717 | } |
| 9718 | else |
| 9719 | { |
| 9720 | for (std::size_t i = 0; i < size_and_type.first; ++i) |
| 9721 | { |
| 9722 | if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal())) |
| 9723 | { |
| 9724 | return false; |
| 9725 | } |
| 9726 | } |
| 9727 | } |
| 9728 | } |
| 9729 | else |
| 9730 | { |
| 9731 | if (JSON_HEDLEY_UNLIKELY(!sax->start_array(std::size_t(-1)))) |
| 9732 | { |
| 9733 | return false; |
| 9734 | } |
| 9735 | |
| 9736 | while (current != ']') |
| 9737 | { |
| 9738 | if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal(false))) |
| 9739 | { |
| 9740 | return false; |
| 9741 | } |
| 9742 | get_ignore_noop(); |
| 9743 | } |
| 9744 | } |
| 9745 | |
| 9746 | return sax->end_array(); |
| 9747 | } |
nothing calls this directly
no test coverage detected