| 625 | // append array/object |
| 626 | |
| 627 | void Serializer::begin_object_internal() { |
| 628 | if (!_stream->good()) { |
| 629 | return; |
| 630 | } |
| 631 | if (!array_add_item(_stream, peek_group_info(), FIELD_OBJECT, 1)) { |
| 632 | return _stream->set_bad(); |
| 633 | } |
| 634 | GroupInfo* info = push_group_info(); |
| 635 | if (info == NULL) { |
| 636 | CHECK(false) << "Fail to push object"; |
| 637 | return _stream->set_bad(); |
| 638 | } |
| 639 | info->item_count = 0; |
| 640 | info->isomorphic = false; |
| 641 | info->item_type = 0; |
| 642 | info->type = FIELD_OBJECT; |
| 643 | info->name_size = 0; |
| 644 | info->output_offset = _stream->pushed_bytes(); |
| 645 | info->pending_null_count = 0; |
| 646 | info->head_area = _stream->reserve(sizeof(ObjectHead)); |
| 647 | info->items_head_area = INVALID_AREA; |
| 648 | } |
| 649 | |
| 650 | void Serializer::begin_object_internal(const StringWrapper& name) { |
| 651 | if (name.empty()) { |
nothing calls this directly
no test coverage detected