! @return whether array creation completed */
| 9758 | @return whether array creation completed |
| 9759 | */ |
| 9760 | bool get_ubjson_array() |
| 9761 | { |
| 9762 | std::pair<std::size_t, char_int_type> size_and_type; |
| 9763 | if (JSON_HEDLEY_UNLIKELY(!get_ubjson_size_type(size_and_type))) |
| 9764 | { |
| 9765 | return false; |
| 9766 | } |
| 9767 | |
| 9768 | if (size_and_type.first != string_t::npos) |
| 9769 | { |
| 9770 | if (JSON_HEDLEY_UNLIKELY(!sax->start_array(size_and_type.first))) |
| 9771 | { |
| 9772 | return false; |
| 9773 | } |
| 9774 | |
| 9775 | if (size_and_type.second != 0) |
| 9776 | { |
| 9777 | if (size_and_type.second != 'N') |
| 9778 | { |
| 9779 | for (std::size_t i = 0; i < size_and_type.first; ++i) |
| 9780 | { |
| 9781 | if (JSON_HEDLEY_UNLIKELY(!get_ubjson_value(size_and_type.second))) |
| 9782 | { |
| 9783 | return false; |
| 9784 | } |
| 9785 | } |
| 9786 | } |
| 9787 | } |
| 9788 | else |
| 9789 | { |
| 9790 | for (std::size_t i = 0; i < size_and_type.first; ++i) |
| 9791 | { |
| 9792 | if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal())) |
| 9793 | { |
| 9794 | return false; |
| 9795 | } |
| 9796 | } |
| 9797 | } |
| 9798 | } |
| 9799 | else |
| 9800 | { |
| 9801 | if (JSON_HEDLEY_UNLIKELY(!sax->start_array(std::size_t(-1)))) |
| 9802 | { |
| 9803 | return false; |
| 9804 | } |
| 9805 | |
| 9806 | while (current != ']') |
| 9807 | { |
| 9808 | if (JSON_HEDLEY_UNLIKELY(!parse_ubjson_internal(false))) |
| 9809 | { |
| 9810 | return false; |
| 9811 | } |
| 9812 | get_ignore_noop(); |
| 9813 | } |
| 9814 | } |
| 9815 | |
| 9816 | return sax->end_array(); |
| 9817 | } |
nothing calls this directly
no test coverage detected